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,17 @@ 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=$(
23
+ git branch -r |
24
+ grep -Ev 'HEAD|v1|v2' |
25
+ sed 's/^[ *]*//' |
26
+ sed 's/^origin\///' |
27
+ jq -R . |
28
+ jq -cs
29
+ )
30
30
echo "branches=$BRANCHES" >> "$GITHUB_OUTPUT"
31
31
32
32
build-compat-pages :
@@ -47,15 +47,20 @@ jobs:
47
47
- run : npm ci
48
48
- run : git checkout ${{ matrix.branch }}
49
49
- run : npm run build-compat
50
+ - run : npm run bundle
50
51
- name : Prepare build artifacts
51
52
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 }}
53
+ mkdir -p ${{ matrix.branch }}/compat
54
+ cp tests/compat/index.html tests/compat/compat-data.js tests/compat/tests.js tests/compat/browsers-runner.js ${{ matrix.branch }}/compat
55
+ mkdir -p ${{ matrix.branch }}/bundles
56
+ cp tests/bundles/* ${{ matrix.branch }}/bundles
57
+ mkdir -p ${{ matrix.branch }}/unit-browser
58
+ cp tests/unit-browser/* ${{ matrix.branch }}/unit-browser
54
59
- name : Upload artifacts for branch ${{ matrix.branch }}
55
60
uses : actions/upload-artifact@v4
56
61
with :
57
62
name : ${{ matrix.branch }}
58
- path : compat/ ${{ matrix.branch }}
63
+ path : ${{ matrix.branch }}
59
64
60
65
combine-pages-and-deploy :
61
66
needs : build-compat-pages
68
73
- name : Download artifacts
69
74
uses : actions/download-artifact@v4
70
75
with :
71
- path : pages/compat
76
+ path : pages
72
77
- run : cp -r docs/ pages/
73
78
- name : Setup Pages
74
79
uses : actions/configure-pages@v5
0 commit comments