-
Notifications
You must be signed in to change notification settings - Fork 46
64 lines (49 loc) · 1.37 KB
/
doc-release.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
53
54
55
56
57
58
59
60
61
62
63
64
# This workflow builds and deploys documentation on a release.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
name: Documentation
on:
release:
types: [published]
jobs:
variables:
name: Variables
uses: ./.github/workflows/VariableProducer.yml
build:
name: Build
needs: variables
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ fromJson(needs.variables.outputs.python-versions)[0] }}
uses: actions/setup-python@v5
with:
python-version: ${{ fromJson(needs.variables.outputs.python-versions)[0] }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade -e .[docs]
- name: Build Documentation
run: |
mkdocs build --strict
- name: Upload Github Pages Site Artifact
uses: actions/upload-pages-artifact@v3
with:
name: "github-pages"
path: "site/"
deploy:
name: Deploy
needs: [variables, build]
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Deploy Github Pages Site
uses: actions/[email protected]
with:
token: ${{ github.token }}
artifact_name: "github-pages"