forked from CESM-Development/cime
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.15 KB
/
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
name: documentation
on:
push:
paths:
- 'docs/**'
branches:
- master
jobs:
update_docs:
name: Updates documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: 'master/'
- uses: actions/checkout@v2
with:
repository: ESMCI/cime
path: 'gh-pages/'
ref: gh-pages
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: install dependencies
run: |
pip install -r ${GITHUB_WORKSPACE}/master/doc/requirements.txt
- name: build documentation
run: |
cd ${GITHUB_WORKSPACE}/master/doc
make BUILDDIR=${GITHUB_WORKSPACE}/gh-pages/versions/master clean
make BUILDDIR=${GITHUB_WORKSPACE}/gh-pages/versions/master html
- name: commit changes
if: ${{ !env.ACT }} # skip if using act
run: |
cd ${GITHUB_WORKSPACE}/gh-pages/
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m 'Updates documentation'
git push gh-pages