-
Notifications
You must be signed in to change notification settings - Fork 179
48 lines (46 loc) · 1.36 KB
/
continuous-docs-deployment.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
name: Continuous Docs Deployment
on:
# Run on every commit pushed to main.
push:
branches:
- main
# This will skip deploy per step 5 of https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site).
pull_request:
branches:
- main
# This lets us trigger manually from the UI.
workflow_dispatch:
jobs:
build:
runs-on:
labels: ubuntu-22.04-4core
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install mkdocs mkdocs-gen-files mkdocs-material mkdocs-exclude mkdocs-print-site-plugin mdx_truly_sane_lists
- name: Build MkDocs And Commit HTML
run: |
mkdocs build
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on:
labels: ubuntu-22.04-4core
needs: build
if: github.event_name == 'push'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4