2019-10-05 20:56:41 +00:00
|
|
|
name: Documentation
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-04-30 21:03:35 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: false
|
2019-10-05 20:56:41 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout the source code
|
2023-04-30 21:03:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2019-10-05 20:56:41 +00:00
|
|
|
- name: Install Python packages
|
|
|
|
run: |
|
|
|
|
pip3 install wheel
|
|
|
|
pip3 install setuptools
|
|
|
|
pip3 install pygithub
|
|
|
|
pip3 install pygithub3
|
|
|
|
- name: Deploy
|
|
|
|
if: github.repository == 'acemod/ACE3' && ! contains(github.event.head_commit.message, '[ci skip]')
|
|
|
|
env:
|
2019-11-23 11:37:26 +00:00
|
|
|
GH_TOKEN: ${{ secrets.DOCS_TOKEN }}
|
2019-10-05 20:56:41 +00:00
|
|
|
run: python3 tools/deploy.py
|
2023-04-30 21:03:35 +00:00
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2023-05-01 14:45:31 +00:00
|
|
|
|
2023-04-30 21:03:35 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Extract Dependencies
|
|
|
|
run: python3 tools/extract_dependencies.py --markdown
|
|
|
|
- name: Document Functions
|
|
|
|
run: python3 docs/tools/document_functions.py
|
|
|
|
|
|
|
|
- name: Build with Jekyll
|
|
|
|
uses: actions/jekyll-build-pages@v1
|
|
|
|
with:
|
|
|
|
source: docs/
|
|
|
|
destination: docs/_site/
|
2023-05-01 14:45:31 +00:00
|
|
|
|
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
2023-04-30 21:03:35 +00:00
|
|
|
with:
|
2023-05-01 14:45:31 +00:00
|
|
|
name: jekyll-site
|
2023-04-30 21:03:35 +00:00
|
|
|
path: docs/_site/
|
2023-05-01 14:45:31 +00:00
|
|
|
retention-days: 1
|
2023-04-30 21:03:35 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build]
|
|
|
|
|
2023-05-01 14:45:31 +00:00
|
|
|
environment:
|
|
|
|
name: netlify
|
|
|
|
url: ${{ steps.deployment.outputs.deploy-url }}
|
|
|
|
|
2023-04-30 21:03:35 +00:00
|
|
|
steps:
|
2023-05-01 14:45:31 +00:00
|
|
|
- name: Download Artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: jekyll-site
|
|
|
|
path: _site/
|
|
|
|
|
|
|
|
- name: Deploy to Netlify
|
2023-04-30 21:03:35 +00:00
|
|
|
id: deployment
|
2023-05-01 14:45:31 +00:00
|
|
|
uses: nwtgck/actions-netlify@v2
|
|
|
|
with:
|
|
|
|
publish-dir: _site/
|
|
|
|
production-branch: master
|
|
|
|
production-deploy: true
|
|
|
|
deploy-message: ${{ github.event.head_commit.message }}
|
|
|
|
enable-pull-request-comment: false
|
|
|
|
enable-commit-comment: false
|
|
|
|
enable-commit-status: true
|
|
|
|
env:
|
|
|
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
|
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
|
|
timeout-minutes: 1
|