|
7 | 7 | steps: |
8 | 8 | - name: Checkout |
9 | 9 | uses: actions/checkout@v4 |
10 | | - - working-directory: ./ |
| 10 | + - name: Set up Python |
| 11 | + uses: actions/setup-python@v4 |
| 12 | + with: |
| 13 | + python-version: '3.x' |
| 14 | + - name: Clone IfcOpenShell |
11 | 15 | env: |
12 | 16 | GH_APIKEY: ${{ secrets.GH_APIKEY }} |
13 | | - GH_TOKEN: ${{ secrets.GH_APIKEY }} |
14 | 17 | run: | |
15 | | - sudo apt update && sudo apt install -y python3-pip |
16 | | - pip3 install furo sphinx-autoapi sphinx-copybutton |
17 | 18 | git clone https://${{ secrets.GH_APIKEY }}@github.com/IfcOpenShell/IfcOpenShell |
18 | 19 | cd IfcOpenShell |
19 | 20 | git checkout 5db65f404 |
20 | | - cd src/bonsai/docs |
| 21 | + - name: Install dependencies |
| 22 | + run: | |
| 23 | + cd IfcOpenShell/src/bonsai/docs |
| 24 | + pip install -r requirements.txt |
| 25 | + - name: Build documentation |
| 26 | + run: | |
| 27 | + cd IfcOpenShell/src/bonsai/docs |
21 | 28 | make html |
22 | | - git config --global user.name 'IfcOpenBot' |
23 | | - git config --global user.email 'IfcOpenBot@users.noreply.github.com' |
24 | | - git clone https://${{ secrets.GH_APIKEY }}@github.com/IfcOpenShell/bonsaibim_org_docs |
25 | | - git -C bonsaibim_org_docs checkout -B main |
26 | | - rm -rf bonsaibim_org_docs/* |
27 | | - cp -r _build/html/* bonsaibim_org_docs/ |
28 | | - echo "docs.bonsaibim.org" > bonsaibim_org_docs/CNAME |
29 | | - touch bonsaibim_org_docs/.nojekyll |
30 | | - echo "<!-- Build: $(date +%s) -->" >> bonsaibim_org_docs/index.html |
31 | | - git -C bonsaibim_org_docs add . |
32 | | - git -C bonsaibim_org_docs commit -m "Build" |
33 | | - git -C bonsaibim_org_docs push |
| 29 | + - name: Deploy to GitHub Pages |
| 30 | + uses: peaceiris/actions-gh-pages@v4 |
| 31 | + with: |
| 32 | + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} |
| 33 | + external_repository: IfcOpenShell/bonsaibim_org_docs |
| 34 | + publish_branch: main |
| 35 | + cname: docs.bonsaibim.org |
| 36 | + publish_dir: IfcOpenShell/src/bonsai/docs/_build/html |
0 commit comments