-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (76 loc) · 2.38 KB
/
Copy pathpages.yml
File metadata and controls
95 lines (76 loc) · 2.38 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Pages
# Builds the shinylive demo from the current checkout and deploys it to GitHub Pages,
# after proving in a real browser that it renders (make site-check), then probes the
# live site once deployed (make site-verify). Every step is a make target, so the
# same build and the same proofs run locally.
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.0.1
with:
# Pinned to the version CI proves changes with; see ci.yml.
version: "0.12.5"
python-version: "3.12"
enable-cache: true
- name: Sync
run: make sync
- name: Install Chromium
run: make browsers PLAYWRIGHT_ARGS=--with-deps
- name: Build the site and prove it renders
run: make site-check
- name: Keep the evidence when the boot check fails
if: failure()
uses: actions/upload-artifact@v7
with:
name: boot-failure
path: tmp/boot-failure.png
if-no-files-found: ignore
- name: Rebuild against the public URL
run: make site SITE_URL=https://rvben.github.io/shiny-plotly
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
# The build job checks the local-URL export; what ships is the public-URL rebuild,
# whose wheel URL only exists once deployed. Probe the live site so a deploy that
# boots broken fails the workflow instead of sitting green.
verify:
needs: deploy
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.12.5"
python-version: "3.12"
enable-cache: true
- name: Sync
run: make sync
- name: Install Chromium
run: make browsers PLAYWRIGHT_ARGS=--with-deps
- name: Prove the live site boots and draws
run: make site-verify