File: build_docs.yml

package info (click to toggle)
esda 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 155,444 kB
  • sloc: python: 7,981; makefile: 40
file content (62 lines) | stat: -rw-r--r-- 1,864 bytes parent folder | download
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
 name: Build Docs
 on:
   push:
     # Sequence of patterns matched against refs/tags
     tags:
       - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
   workflow_dispatch:
     inputs:
       version:
         description: Manual Doc Build Reason
         default: test
         required: false
 jobs:
   docs:
     name: Build and Push Docs (${{ 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/312-latest.yaml]
         experimental: [false]
     defaults:
       run:
         shell: bash -l {0}

     steps:
       - name: Checkout repo
         uses: actions/checkout@v4

       - name: Setup micromamba
         uses: mamba-org/setup-micromamba@v2
         with:
           environment-file: ${{ matrix.environment-file }}
           micromamba-version: 'latest'

       - name: Install esda
         run: pip install .

       - name: Make Docs
         run: cd docs; make html

       - name: Commit Docs
         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 to gh-pages
         uses: ad-m/github-push-action@master
         with:
            branch: gh-pages
            directory: gh-pages
            github_token: ${{ secrets.GITHUB_TOKEN }}
            force: true