-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.2 KB
/
deploy-docs.yaml
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
# SPDX-FileCopyrightText: Copyright 2020-2024, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0
name: Deploy docs
on:
push:
tags:
- latest # always match latest
- "v[1-9]+" # match only major releases
# - 'v[0-9]+.[0-9]+.[0-9]*' # OR: match all semver
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: false
permissions:
contents: write
pages: write
id-token: write
jobs:
docs-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Deploy docs for ${{ github.ref_name }}
run: |
pip install hatch
git fetch origin gh-pages # prevent conflicts
hatch run deploy-docs ${{ github.ref_name }} --update-aliases --push
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2