File tree Expand file tree Collapse file tree 4 files changed +44
-22
lines changed Expand file tree Collapse file tree 4 files changed +44
-22
lines changed Original file line number Diff line number Diff line change 11name : Build
22on :
33 pull_request :
4- branches :
5- - main
4+ branches : [main]
65 push :
7- branches :
8- - main
6+ branches : [main]
97jobs :
108 build :
119 name : Lint and tests
2523 - run : npm ci
2624 - run : npm run lint
2725 - run : npm test
28- deploy :
29- name : Live viewer
30- needs : build
31- runs-on : ubuntu-latest
32- steps :
33- - uses : actions/checkout@v4
34- - uses : actions/setup-node@v4
35- - run : npm ci
36- - name : Build Live Viewer
37- run : bash scripts/deploy-live-viewer.sh
38- - name : Push to gh-pages
39- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
40- uses : peaceiris/actions-gh-pages@v3
41- with :
42- github_token : ${{ secrets.GITHUB_TOKEN }}
43- publish_dir : ./out
Original file line number Diff line number Diff line change 1+ name : Live Viewer
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ permissions :
8+ contents : read
9+ pages : write
10+ id-token : write
11+
12+ concurrency :
13+ group : pages
14+ cancel-in-progress : false
15+
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : actions/setup-node@v4
22+ - run : npm ci
23+ - name : Setup Pages
24+ id : pages
25+ uses : actions/configure-pages@v3
26+ - name : Build into _site
27+ run : bash scripts/deploy-live-viewer.sh
28+ - name : Upload artifact
29+ uses : actions/upload-pages-artifact@v2
30+ deploy :
31+ runs-on : ubuntu-latest
32+ needs : build
33+ environment :
34+ name : github-pages
35+ url : ${{ steps.deployment.outputs.page_url }}
36+ steps :
37+ - name : Deploy to GitHub Pages
38+ id : deployment
39+ uses : actions/deploy-pages@v2
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ lib/Function.js
1212lib /URL.js
1313lib /URLSearchParams.js
1414lib /utils.js
15+ _site /
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ cd "$(dirname "$0")"
66
77npm run build-live-viewer
88
9- mkdir -p ../out
10- cp -r ../live-viewer/* ../out # exclude files starting with . by using /*
9+ mkdir -p ../_site
10+ cp -r ../live-viewer/* ../_site # exclude files starting with . by using /*
You can’t perform that action at this time.
0 commit comments