1
1
name : Build and Deploy pages to GitHub Pages
2
- on :
3
- push :
4
- branches :
5
- - master
6
- - pages
7
- pull_request :
8
- workflow_dispatch :
2
+ on : [push, pull_request, workflow_dispatch]
9
3
10
4
permissions :
11
5
contents : read
@@ -22,11 +16,11 @@ jobs:
22
16
uses : actions/checkout@v4
23
17
with :
24
18
fetch-depth : 0
25
-
26
19
- name : Get branch list and set output
27
20
id : set-branches
28
21
run : |
29
- BRANCHES=$(git branch -r | sed 's/^[ *]*//' | grep -v 'HEAD' | sed 's/^origin\///' | grep -v 'v1' | grep -v 'v2' | jq -R . | jq -cs)
22
+ "BRANCHES=$(git branch -r | grep -v 'HEAD' | grep -v 'v1' | grep -v 'v2' \
23
+ | sed 's/^[ *]*//' | sed 's/^origin\///' | jq -R . | jq -cs)"
30
24
echo "branches=$BRANCHES" >> "$GITHUB_OUTPUT"
31
25
32
26
build-compat-pages :
@@ -47,15 +41,20 @@ jobs:
47
41
- run : npm ci
48
42
- run : git checkout ${{ matrix.branch }}
49
43
- run : npm run build-compat
44
+ - run : npm run bundle
50
45
- name : Prepare build artifacts
51
46
run : |
52
- mkdir -p compat/${{ matrix.branch }}
53
- cp tests/compat/index.html tests/compat/compat-data.js tests/compat/tests.js tests/compat/browsers-runner.js compat/${{ matrix.branch }}
47
+ mkdir -p ${{ matrix.branch }}/compat
48
+ cp tests/compat/index.html tests/compat/compat-data.js tests/compat/tests.js tests/compat/browsers-runner.js ${{ matrix.branch }}/compat
49
+ mkdir -p ${{ matrix.branch }}/bundles
50
+ cp tests/bundles/* ${{ matrix.branch }}/bundles
51
+ mkdir -p ${{ matrix.branch }}/unit-browser
52
+ cp tests/unit-browser/* ${{ matrix.branch }}/unit-browser
54
53
- name : Upload artifacts for branch ${{ matrix.branch }}
55
54
uses : actions/upload-artifact@v4
56
55
with :
57
56
name : ${{ matrix.branch }}
58
- path : compat/ ${{ matrix.branch }}
57
+ path : ${{ matrix.branch }}
59
58
60
59
combine-pages-and-deploy :
61
60
needs : build-compat-pages
68
67
- name : Download artifacts
69
68
uses : actions/download-artifact@v4
70
69
with :
71
- path : pages/compat
70
+ path : pages
72
71
- run : cp -r docs/ pages/
73
72
- name : Setup Pages
74
73
uses : actions/configure-pages@v5
0 commit comments