Skip to content

Commit 673045b

Browse files
committed
feat: Publish main along with release under bids-validator/dev
1 parent 0651306 commit 673045b

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

.github/workflows/web_build.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Web validator
33

44
on:
55
push:
6-
branches: [master, main]
6+
branches: [main, stable]
77
pull_request:
8-
branches: [master, main]
8+
branches: [main, stable]
99
release:
1010
types: [published]
1111
workflow_dispatch:
@@ -20,7 +20,8 @@ concurrency:
2020
cancel-in-progress: true
2121

2222
jobs:
23-
build:
23+
test-build:
24+
if: ${{ github.event_name != 'release' && !inputs.deploy }}
2425
runs-on: ubuntu-latest
2526
steps:
2627
- uses: actions/checkout@v4
@@ -34,20 +35,47 @@ jobs:
3435
with:
3536
path: web/dist
3637

38+
build:
39+
if: ${{ github.event_name == 'release' || inputs.deploy }}
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout release/target
43+
uses: actions/checkout@v4
44+
with:
45+
# Use the implicit ref, assuming it's stable
46+
path: stable
47+
- name: Checkout main
48+
uses: actions/checkout@v4
49+
with:
50+
ref: main
51+
path: main
52+
- uses: denoland/setup-deno@v2
53+
with:
54+
deno-version: v2.x
55+
- name: Build release/target
56+
run: deno task build
57+
working-directory: stable/web
58+
- name: Build main
59+
run: deno task build
60+
working-directory: main/web
61+
- name: Nest main inside stable
62+
run: mv main/web/dist stable/web/dist/dev
63+
- name: Upload GitHub Pages artifact
64+
uses: actions/upload-pages-artifact@v3
65+
with:
66+
path: stable/web/dist
67+
3768
deploy:
3869
needs: build
39-
if: ${{ github.event_name == 'release' || inputs.deploy }}
4070
permissions:
4171
contents: read
4272
pages: write
4373
id-token: write
44-
# Deploy to the github-pages environment
4574
environment:
4675
name: github-pages
4776
url: ${{ steps.deployment.outputs.page_url }}
48-
# Specify runner + deployment step
4977
runs-on: ubuntu-latest
5078
steps:
5179
- name: Deploy to GitHub Pages
5280
id: deployment
53-
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
81+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)