File: docs.yml

package info (click to toggle)
python-inline-snapshot 0.31.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,708 kB
  • sloc: python: 9,261; makefile: 39; sh: 32
file content (30 lines) | stat: -rw-r--r-- 940 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
name: Publish docs via GitHub Pages
on:
  push:
    tags:
    - v[0-9]+.[0-9]+.[0-9]+

jobs:
  build:
    name: Deploy docs for new version
    if: "!contains(github.repository, '-insiders/')"
    runs-on: ubuntu-latest
    steps:
    - name: Checkout main
      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

    - name: Set up documentation mutex
      uses: ben-z/gh-action-mutex@v1.0.0-alpha.10
      with:
        branch: docs-mutex

    - run: pip install hatch
    - run: hatch version | sed -rne "s:([0-9]*)\.([0-9]*)\..*:INLINE_SNAPSHOT_VERSION=\1.\2:p" >> ${GITHUB_ENV}
    - name: publish docs
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |
        git config user.name "Frank Hoffmann"
        git config user.email "15r10nk@users.noreply.github.com"
        git fetch origin gh-pages --depth=1
        hatch run docs:mike deploy -u --push ${INLINE_SNAPSHOT_VERSION} latest