forked from gpuweb/gpuweb
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.33 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
41
42
43
44
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:
paths-ignore: [ "tools/custom-action/Dockerfile" ]
push:
branches: [main]
paths-ignore:
- "tools/custom-action/Dockerfile"
- "tools/custom-action/entrypoint.sh"
# 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-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Build and validate with custom action
uses: ./tools/custom-action/
- name: Deploy to GitHub Pages
if: ${{ success() && github.ref == 'refs/heads/main' }}
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: out