-
Notifications
You must be signed in to change notification settings - Fork 44
78 lines (69 loc) · 2.36 KB
/
Copy pathdocs.yml
File metadata and controls
78 lines (69 loc) · 2.36 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
69
70
71
72
73
74
75
76
77
78
name: Docs
# Builds the MkDocs site from sources spread across the repo (docs/,
# skywire-specs/, rewards/, cmd/apps/**/README.md, cmd/dmsg/*/README.md,
# cmd/svc/*/README.md) and deploys to the gh-pages branch, which GitHub
# Pages serves at https://skycoin.github.io/skywire/.
#
# Triggers:
# - push to develop: build + deploy
# - pull_request: build only (catches broken links / config drift
# before merge; doesn't touch gh-pages)
# - workflow_dispatch: manual rebuild button
on:
push:
branches: [develop]
paths:
- 'docs/**'
- 'skywire-specs/**'
- 'rewards/**'
- 'cmd/apps/*/README.md'
- 'cmd/dmsg/*/README.md'
- 'cmd/svc/*/README.md'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
- 'scripts/docs-prepare.sh'
pull_request:
paths:
- 'docs/**'
- 'skywire-specs/**'
- 'rewards/**'
- 'cmd/apps/*/README.md'
- 'cmd/dmsg/*/README.md'
- 'cmd/svc/*/README.md'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
- 'scripts/docs-prepare.sh'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- name: Install MkDocs + plugins
run: |
pip install \
mkdocs-material==9.5.* \
mkdocs-awesome-pages-plugin==2.9.* \
pymdown-extensions==10.*
- name: Stage external doc trees under docs/
run: bash scripts/docs-prepare.sh
- name: Build
# No --strict here — the upstream skywire-specs/ and rewards/
# markdown contain a handful of dangling links / case-mismatched
# anchors that would otherwise block the deploy. mkdocs.yml
# already sets `strict: false`; we just have to not override it
# from the CLI. Warnings are still printed to the build log so
# a content-cleanup follow-up can address them.
run: mkdocs build
- name: Deploy to gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
mkdocs gh-deploy --force --message "Deploy docs from {sha}"