-
-
Notifications
You must be signed in to change notification settings - Fork 3
89 lines (77 loc) · 2.43 KB
/
deploy.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: "🚀 Deployment"
on:
push:
branches:
- main
paths:
- ".github/workflows/deploy.yml"
- "config/*.yml"
- "content/**"
- "mkdocs.yml"
- "requirements*.txt"
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
name: "📤 GitHub Pages"
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'geotribu' }}
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Get source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: "pip"
- name: Install dependencies
env:
GH_TOKEN_MATERIAL_INSIDERS: ${{ secrets.GH_TOKEN_MATERIAL_INSIDERS }}
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-insiders.txt
- name: Cache build dependencies (external assets downloaded)
uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- name: Build static website
run: |
python scripts/100_mkdocs_config_merger.py -c mkdocs.yml
mkdocs build --clean --config-file mkdocs.yml --verbose --strict
env:
MKDOCS_ENABLE_PLUGIN_BLOG: true
MKDOCS_ENABLE_PLUGIN_GIT_AUTHORS: true
MKDOCS_ENABLE_PLUGIN_GIT_COMMITTERS: true
MKDOCS_ENABLE_PLUGIN_GIT_DATES: true
MKDOCS_ENABLE_PLUGIN_PRIVACY: true
MKDOCS_ENABLE_PLUGIN_SOCIAL: true
MKDOCS_ENABLE_PLUGIN_SOCIAL_CARDS: true
MKDOCS_ENABLE_PLUGIN_RSS: true
MKDOCS_ENABLE_PLUGIN_TAGS: true
MKDOCS_ENABLE_PLUGIN_TYPESET: true
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "build/mkdocs/site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4