-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.56 KB
/
Copy pathdocs.yml
File metadata and controls
64 lines (53 loc) · 1.56 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
name: Deploy docs
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'README.md'
- 'scripts/install-online.sh'
- 'scripts/install.sh'
- '.github/workflows/docs.yml'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin pillow cairosvg
- run: |
cp README.md docs/index.md
sed -i 's|docs/assets/|assets/|g' docs/index.md
sed -i 's|docs/\([a-z-]*\)\.md|\1/|g' docs/index.md
mkdocs build
- name: Fix asset paths in subdirectory pages
run: |
for dir in architecture config export guest dbus-proxy quadlet protocol troubleshooting; do
[ -d "site/$dir" ] && find "site/$dir" -name '*.html' -exec \
sed -i 's|"assets/|"../assets/|g' {} +
done
- name: Copy install script and assets
run: |
cp scripts/install-online.sh site/install.sh
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4