-
Notifications
You must be signed in to change notification settings - Fork 91
52 lines (48 loc) · 1.4 KB
/
release-docs.yml
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
name: Release Workshop Docs
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'Makefile'
workflow_dispatch: {}
permissions:
contents: write # Required for checkout and upload-pages-artifact actions
deployments: write # Required for deploy-pages action
id-token: write # Required for deploy-pages action if using OIDC for authentication
pages: write # Required for configure-pages, upload-pages-artifact, and deploy-pages actions
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
release-docs:
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Capture branch and tag
id: branch_name
run: |
echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build workshop site
run: |
make build-docs-website
- name: Release all docs to branch
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./dist
branch: gh-pages
clean-exclude: |
pr-preview
.github
publish-docs:
name: Publish
needs: release-docs
uses: ./.github/workflows/publish-docs.yml