forked from gpuweb/gpuweb
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.39 KB
/
build-validate-publish.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
name: build-validate-publish
# This workflow runs on pull requests and pushes to the main branch, and
# builds/validates the specs, other documents, and supplemental materials.
# This includes verifying the WGSL grammar which is one of the generated
# supplemental materials.
#
# On pushes to the main branch, it also publishes the outputs to GitHub Pages.
on:
pull_request:
push:
branches: [main]
# Allows admins to trigger the workflow manually from GitHub's UI.
workflow_dispatch:
jobs:
# Note, spec-prod can publish to gh-pages as well, but we use a custom publish
# step to publish additional files anyway, so we use that instead of making
# many separate gh-pages commits (one per bikeshed file + one for extras).
build-validate-publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build and validate
run: |
export PATH="$(python3 -m site --user-base)/bin:${PATH}"
sh tools/install-dependencies.sh bikeshed wgsl diagrams
BIKESHED_DISALLOW_ONLINE=1 REQUIRE_DIAGRAM_GENERATION=1 make -j out
# Ensure diagrams didn't change after regeneration
sh tools/check-repo-clean.sh
- name: Deploy to GitHub Pages
if: ${{ success() && github.ref == 'refs/heads/main' }}
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: out