2
2
on :
3
3
push :
4
4
branches :
5
- - master
6
5
- main
6
+
7
7
jobs :
8
8
docs :
9
- name : CI (${{ matrix.os }}-${{ matrix.environment-file }})
9
+ name : Build & Push Docs
10
10
runs-on : ${{ matrix.os }}
11
- continue-on-error : ${{ matrix.experimental }}
12
- timeout-minutes : 20
11
+ timeout-minutes : 90
13
12
strategy :
14
13
matrix :
15
14
os : ['ubuntu-latest']
18
17
defaults :
19
18
run :
20
19
shell : bash -l {0}
20
+
21
21
steps :
22
- - uses : actions/checkout@v2
23
- - uses : actions/cache@v2
24
- env :
25
- CACHE_NUMBER : 0
22
+ - name : Checkout repo
23
+ uses : actions/checkout@v4
26
24
with :
27
- path : ~/conda_pkgs_dir
28
- key : ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }}
29
- - uses : conda-incubator/setup-miniconda@v2
25
+ fetch-depth : 0 # Fetch all history for all branches and tags.
26
+
27
+ - name : Setup micromamba
28
+ uses : mamba-org/setup-micromamba@v1
30
29
with :
31
- miniconda-version : ' latest'
32
- channels : conda-forge
33
- channel-priority : true
34
- auto-update-conda : true
35
- auto-activate-base : false
36
- environment-file : ${{ matrix.environment-file }}
37
- activate-environment : test
38
- use-only-tar-bz2 : true
39
- - run : conda info --all
40
- - run : conda list
41
- - run : conda config --show-sources
42
- - run : conda config --show
43
- - run : pip install -e . --no-deps --force-reinstall
44
- - run : |
45
- cd docs
46
- make html
47
- - name : Commit documentation changes
30
+ environment-file : ${{ matrix.environment-file }}
31
+ micromamba-version : ' latest'
32
+
33
+ - name : Install
34
+ run : pip install -e . --no-deps --force-reinstall
35
+
36
+ - name : Make Docs
37
+ run : cd docs; make html
38
+
39
+ - name : Commit Docs
48
40
run : |
49
41
git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
50
42
cp -r docs/_build/html/* gh-pages/
53
45
git config --local user.name "GitHub Action"
54
46
git add .
55
47
git commit -m "Update documentation" -a || true
56
- # The above command will fail if no changes were present, so we ignore
57
- # the return code.
58
- - name : Push changes
48
+ # The above command will fail if no changes were present,
49
+ # so we ignore the return code.
50
+
51
+ - name : Push to gh-pages
59
52
uses : ad-m/github-push-action@master
60
53
with :
61
54
branch : gh-pages
62
55
directory : gh-pages
63
56
github_token : ${{ secrets.GITHUB_TOKEN }}
64
- force : true
57
+ force : true
0 commit comments