summaryrefslogtreecommitdiffstats
path: root/.github/workflows/publish-docs.yml
blob: 6dc8f16eff965e8c5b65112ba7aea948cfcfcd52 (plain)
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
name: Publish Docs

on:
  workflow_call:
    inputs:
      docs_version:
        description: "Version to build docs for (dev | latest | 0.19.x | ...)"
        required: true
        type: string
  workflow_dispatch:
    inputs:
      docs_version:
        description: "Version to build docs for (dev | latest | 0.19.x | ...)"
        type: string
        default: dev
  
permissions:
  contents: write

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3.3.0
      - uses: actions/setup-python@v4.6.1
        with:
          python-version: 3.11

      - name: Install Hatch
        run: python -m pip install hatch==1.6.3

      - name: Configure Git for GitHub Actions bot
        run: |
          git config --local user.name 'github-actions[bot]'
          git config --local user.email 'github-actions[bot]@users.noreply.github.com'

      - name: Deploy dev docs
        run: hatch run docs:mike deploy --push --update-aliases ${{ inputs.docs_version }}