forked from acemod/ACE3
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (73 loc) · 2 KB
/
documentation.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
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/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: jekyll-site
path: docs/_site/
retention-days: 1
deploy:
runs-on: ubuntu-latest
needs: [build]
environment:
name: netlify
url: ${{ steps.deployment.outputs.deploy-url }}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: jekyll-site
path: _site/
- name: Deploy to Netlify
id: deployment
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