mirror of
https://github.com/storytold/egui.git
synced 2026-11-22 07:35:41 +00:00
faa2876b9f
Each third-party action that StepSecurity publishes a secure drop-in replacement for now uses that replacement, pinned to a commit with its version as a comment. Versions follow what we used: the newest StepSecurity release in the same major, or the closest major they publish. dtolnay/rust-toolchain refs that named a toolchain (stable, nightly, 1.76) become the replacement's `toolchain` input.
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
name: Deploy web demo
|
|
|
|
on:
|
|
# We only run this on merges to main
|
|
push:
|
|
branches: ["main"]
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
# to only run when you do a new github release, comment out above part and uncomment the below trigger.
|
|
# on:
|
|
# release:
|
|
# types: ["published"]
|
|
|
|
permissions:
|
|
contents: write # for committing to gh-pages branch
|
|
|
|
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
RUSTFLAGS: -D warnings
|
|
RUSTDOCFLAGS: -D warnings
|
|
|
|
jobs:
|
|
# Single deploy job since we're just deploying
|
|
deploy:
|
|
name: Deploy web demo
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Harden runner
|
|
uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
|
with:
|
|
egress-policy: audit
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: step-security/actions-rs-toolchain@40a2f87e50bed6faa2d050e99810b226b75d8c8a # v1.0.7
|
|
with:
|
|
profile: minimal
|
|
target: wasm32-unknown-unknown
|
|
toolchain: 1.95.0
|
|
override: true
|
|
|
|
- uses: step-security/rust-cache@8871c8ba063416da7c32246932ea6ae08700453e # v2.9.2
|
|
with:
|
|
prefix-key: "web-demo-"
|
|
|
|
- name: Install wasm-opt
|
|
uses: sigoden/install-binary@v1
|
|
with:
|
|
repo: WebAssembly/binaryen
|
|
tag: version_123
|
|
name: wasm-opt
|
|
|
|
- run: |
|
|
scripts/build_demo_web.sh --release
|
|
|
|
- name: Deploy
|
|
uses: step-security/github-pages-deploy-action@fe9e6f669019bdc4519d0fe69013b428268eb30c # v4.9.0
|
|
with:
|
|
folder: web_demo
|
|
# this option will not maintain any history of your previous pages deployment
|
|
# set to false if you want all page build to be committed to your gh-pages branch history
|
|
single-commit: true
|