-
Notifications
You must be signed in to change notification settings - Fork 13
56 lines (56 loc) · 1.85 KB
/
build_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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build Docs
on:
push:
branches:
- master
- main
jobs:
docs:
name: CI (${{ matrix.os }}-${{ matrix.environment-file }})
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 90
strategy:
matrix:
os: ['ubuntu-latest']
environment-file: [.ci/310.yml]
experimental: [false]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: 'latest'
auto-update-conda: true
auto-activate-base: false
environment-file: ${{ matrix.environment-file }}
activate-environment: test
- shell: bash -l {0}
run: conda info --all
- shell: bash -l {0}
run: conda list
- shell: bash -l {0}
run: conda config --show-sources
- shell: bash -l {0}
run: conda config --show
- shell: bash -l {0}
run: pip install -e . --no-deps --force-reinstall
- shell: bash -l {0}
run: cd docs; make html
- name: Commit documentation changes
run: |
git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
cp -r docs/_build/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true