-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.3 KB
/
Copy pathdocs.yml
File metadata and controls
57 lines (54 loc) · 1.3 KB
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
name: Build & Deploy Docs
on:
workflow_dispatch:
pull_request:
branches:
- dev
paths:
- 'docs/**'
- 'src/**'
- 'mkdocs.yml'
push:
branches:
- main
paths:
- 'docs/**'
- 'src/**'
- 'mkdocs.yml'
permissions:
contents: read
pages: write
id-token: write
jobs:
build_mkdocs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: '3.9'
- name: Install packages with pip
run: |
pip install 'mkdocs-material[imaging]' 'mkdocstrings[python]'
pip install mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2
- name: Build with MkDocs
run: mkdocs build --config-file mkdocs.yml
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: site/
deploy_mkdocs:
if: ${{ github.event_name != 'pull_request' }}
needs: build_mkdocs
environment:
name: github-pages
url: https://mkh-user.github.io/graphite
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5