-
Notifications
You must be signed in to change notification settings - Fork 221
54 lines (45 loc) · 1.26 KB
/
publish-web.yaml
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
name: publish-web
on:
push:
branches:
- web
# Even though releases push to `web` branch, that doesn't cause this workflow
# to run, because GHA can't start workflows itself. So we also run on
# releases.
release:
types: [released]
# Called by pull-request when specifically requested
workflow_call:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# We need consistent env vars across all workflows for the cache to work
env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTFLAGS: "-C debuginfo=0"
RUSTDOCFLAGS: "-Dwarnings"
jobs:
build-web:
uses: ./.github/workflows/build-web.yaml
deploy-web:
needs: build-web
runs-on: ubuntu-22.04
# Don't attempt to publish if on a fork or on a PR running on upstream.
if:
${{ github.repository_owner == 'prql' &&
!github.event.pull_request.head.repo.fork }}
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]