-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.87 KB
/
Copy pathdeploy.yml
File metadata and controls
68 lines (58 loc) · 1.87 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
58
59
60
61
62
63
64
65
66
67
68
name: Deploy MkDocs to GitHub Pages
on:
push:
branches: ["main"]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
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 system deps (Cairo for social cards)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libcairo2 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libgdk-pixbuf2.0-0 \
libffi-dev
- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: mkdocs build --strict
- name: Deploy
run: mkdocs gh-deploy --force
- name: Notify success
if: success()
run: |
curl -s \
-H "Title: Docs site deployed" \
-H "Priority: min" \
-H "Tags: rocket" \
-d "Site deployed successfully to developer.piratemidi.com
Commit: ${{ github.event.head_commit.message }}
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
"ntfy.sh/${{ secrets.NTFY_TOPIC }}"
- name: Notify failure
if: failure()
run: |
curl -s \
-H "Title: Docs site deploy failed" \
-H "Priority: high" \
-H "Tags: x" \
-d "Site deployment to GitHub Pages failed.
Commit: ${{ github.event.head_commit.message }}
Check the run for details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
"ntfy.sh/${{ secrets.NTFY_TOPIC }}"