Skip to content

[playground] Improve experience when the server is not accessible or … #123

[playground] Improve experience when the server is not accessible or …

[playground] Improve experience when the server is not accessible or … #123

Workflow file for this run

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