-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (52 loc) · 1.93 KB
/
main-push-update-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Docs
on:
push:
branches:
- main
jobs:
update_docs:
name: Update Docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install PonyC, Corral, MkDocs
run: |
mkdir -p ./ponyc
wget -q https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest/ponyc-x86-64-unknown-linux-ubuntu22.04.tar.gz
tar xzf ponyc-x86-64-unknown-linux-ubuntu22.04.tar.gz --directory ./ponyc --strip-components=1
mkdir -p ./corral
wget -q https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest/corral-x86-64-unknown-linux.tar.gz
tar xzf corral-x86-64-unknown-linux.tar.gz --directory ./corral --strip-components=1
pip install mkdocs
pip install mkdocs-material
- name: Run Tests
run: |
export PATH=`pwd`/ponyc/bin:`pwd`/corral/bin:$PATH
corral fetch
PONYC=./ponyc/bin/ponyc make test
- name: Build Docs
run: |
export PATH=`pwd`/ponyc/bin:`pwd`/corral/bin:$PATH
PONYC=./ponyc/bin/ponyc make docs
cd build/eohippus-docs
echo "site_description: Eohippus `cat ../../VERSION`-`git rev-parse --short --verify HEAD`" >> mkdocs.yml
python -m mkdocs build --quiet
- name: Checkout Docs Site
uses: actions/checkout@v4
with:
repository: chalcolith/chalcolith.github.io
token: ${{ secrets.GITHUB_TOKEN }}
ref: main
path: chalcolith.github.io
fetch-depth: 0
- name: Copy Files
run: |
rm -rf ./chalcolith.github.io/eohippus/*
cp -a ./build/eohippus-docs/site/* ./chalcolith.github.io/eohippus/
- name: Commit
run: |
cd ./chalcolith.github.io/eohippus
git config user.name "GitHub Actions"
git config user.email "<>"
git commit -a -m "Updated Eohippus docs on `date`"
git push