ACE3/.github/workflows/documentation.yml

86 lines
2.0 KiB
YAML
Raw Permalink Normal View History

name: Documentation
on:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- 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:
GH_TOKEN: ${{ secrets.DOCS_TOKEN }}
run: python3 tools/deploy.py
build:
runs-on: ubuntu-latest
2023-05-01 14:45:31 +00:00
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
2024-02-29 03:54:08 +00:00
uses: actions/upload-artifact@v4
with:
2023-05-01 14:45:31 +00:00
name: jekyll-site
path: docs/_site/
2023-05-01 14:45:31 +00:00
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [build]
2023-05-01 14:45:31 +00:00
environment:
name: netlify
url: ${{ steps.deployment.outputs.deploy-url }}
steps:
2023-05-01 14:45:31 +00:00
- name: Download Artifacts
2024-02-29 03:54:08 +00:00
uses: actions/download-artifact@v4
2023-05-01 14:45:31 +00:00
with:
name: jekyll-site
path: _site/
- name: Deploy to Netlify
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