@@ -3,9 +3,9 @@ name: Web validator
33
44on :
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
2222jobs :
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