-
Notifications
You must be signed in to change notification settings - Fork 18
75 lines (61 loc) · 2.58 KB
/
deploy_docs.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
name: deploy to gh-pages
on:
workflow_dispatch: {}
push:
branches: [master]
paths:
- "docs/**"
- "schemas/**"
- "generate/src/bin/generate_from_types/**"
- ".github/workflows/deploy_docs.yml"
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
container:
image: ubuntu:mantic-20231011
defaults:
run:
working-directory: ./docs
steps:
- name: 📥 Checkout repo
uses: actions/checkout@v4
- name: 🛠 Install system dependencies
run: |
set -e
apt-get update -y -qq
apt-get install -y libegl1-mesa-dev libgl1-mesa-dri libxcb-xfixes0-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev libopus-dev
# required when job is running in docker container
apt-get install -y build-essential curl pkg-config git libssl-dev libclang-dev libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0
- name: 🛠 Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: 20
- name: 🔧 Install the rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: 📄 Generate docs from JSON schema
working-directory: ./generate
run: cargo run --bin generate_from_types
- name: 🛠 Install dependencies
run: npm ci
- name: 📦 Build website
run: npm run build
- name: 🔍 Add site verification token
run: |
echo "google-site-verification: google6d25fc2581984d6a.html" > ./build/google6d25fc2581984d6a.html
- name: 🖋️ Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
cname: compositor.live
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com