Repository navigation
56 lines (51 loc) · 1.62 KB
/
Copy pathdocs.yml
File metadata and controls
56 lines (51 loc) · 1.62 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
# Documentation site: builds the MkDocs site with --strict (0 warnings required) on every pull request and publishes it to
# GitHub Pages when main changes. One-time setup in the repository: Settings -> Pages -> Source: "GitHub Actions".
# The site is https://josephcodemard.github.io/UltrafastEngine/ (site_url in mkdocs.yml).
name: Docs
on:
push:
branches: [main]
paths: ["docs/**", "overrides/**", "mkdocs.yml", ".github/workflows/docs.yml"]
pull_request:
paths: ["docs/**", "overrides/**", "mkdocs.yml", ".github/workflows/docs.yml"]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build the site (strict)
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install MkDocs
run: pip install mkdocs
- name: Build (any warning fails the job)
run: mkdocs build --strict
- uses: actions/configure-pages@v5
if: github.event_name != 'pull_request'
- uses: actions/upload-pages-artifact@v3
if: github.event_name != 'pull_request'
with:
path: site
deploy:
name: Publish to GitHub Pages
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4