-
Notifications
You must be signed in to change notification settings - Fork 64
57 lines (55 loc) · 2.19 KB
/
Copy pathdeploy.yml
File metadata and controls
57 lines (55 loc) · 2.19 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
# Based on <https://github.com/rust-lang/mdBook/wiki/Automated-Deployment:-GitHub-Actions/6cd0e9edbaf9f5b3ae495ece9d48f4145d001d14>
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate link list
run: |
for link in $(grep -Rin --include="*.md" -E -o "https?://[a-zA-Z0-9./?#=_%:-]*[^\.]" src); do
echo "$link" | sed 's/\.$//' >> src/links.txt
done
- name: Configure PATH
run: |
mkdir -p opt/mdbook
mkdir -p opt/mdbook-mermaid
echo "$(pwd)/opt/mdbook" >> $GITHUB_PATH
echo "$(pwd)/opt/mdbook-mermaid" >> $GITHUB_PATH
- name: Install latest mdbook
run: |
tag=v0.5.1
url="https://github.com/rust-lang/mdbook/releases/download/$tag/mdbook-$tag-x86_64-unknown-linux-gnu.tar.gz"
curl -sSL "$url" | tar -xz --directory=./opt/mdbook
- name: Install latest mdbook-mermaid
run: |
tag=v0.17.0
url="https://github.com/badboy/mdbook-mermaid/releases/download/$tag/mdbook-mermaid-$tag-x86_64-unknown-linux-gnu.tar.gz"
curl -sSL "$url" | tar -xz --directory=./opt/mdbook-mermaid
- name: Generate web platform feature page
run: |
curl 'https://raw.githubusercontent.com/servo/servo/refs/heads/main/components/config/prefs.rs' -O
curl 'https://raw.githubusercontent.com/servo/servo/refs/heads/main/ports/servoshell/prefs.rs' -o servoshell_prefs.rs
python generate-features.py prefs.rs servoshell_prefs.rs >src/design-documentation/experimental-features.md
- name: Build book
run: |
mdbook build
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'book'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4