22 on :
33 push :
44 branches :
5- - master
65 - main
6+
77 jobs :
88 docs :
9- name : CI (${{ matrix.os }}-${{ matrix.environment-file }})
9+ name : Build & Push Docs
1010 runs-on : ${{ matrix.os }}
11- continue-on-error : ${{ matrix.experimental }}
12- timeout-minutes : 20
11+ timeout-minutes : 90
1312 strategy :
1413 matrix :
1514 os : ['ubuntu-latest']
1817 defaults :
1918 run :
2019 shell : bash -l {0}
20+
2121 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
2624 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
3029 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
4840 run : |
4941 git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
5042 cp -r docs/_build/html/* gh-pages/
5345 git config --local user.name "GitHub Action"
5446 git add .
5547 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
5952 uses : ad-m/github-push-action@master
6053 with :
6154 branch : gh-pages
6255 directory : gh-pages
6356 github_token : ${{ secrets.GITHUB_TOKEN }}
64- force : true
57+ force : true
0 commit comments