File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to Beta
2+
3+ on :
4+ push :
5+ branches :
6+ - updates
7+ workflow_dispatch :
8+
9+ # Allow only one concurrent deployment
10+ concurrency :
11+ group : " deploy-beta"
12+ cancel-in-progress : false
13+
14+ permissions :
15+ contents : write
16+
17+ jobs :
18+ deploy :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout source repo
22+ uses : actions/checkout@v4
23+ with :
24+ ref : updates
25+
26+ - name : Use Node.js
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : " 20"
30+
31+ - name : Install dependencies
32+ working-directory : Build
33+ run : npm i
34+
35+ - name : Build
36+ working-directory : Build
37+ run : npm run build
38+
39+ - name : Checkout target repo
40+ uses : actions/checkout@v4
41+ with :
42+ repository : HTMLToolkit/beta
43+ path : beta
44+ ref : main
45+ token : ${{ secrets.GITHUB_TOKEN }}
46+
47+ - name : Clear and copy build to subfolder
48+ run : |
49+ rm -rf beta/HTMLPlayerBeta/*
50+ cp -r Build/dist/* beta/HTMLPlayerBeta/
51+
52+ - name : Commit and push changes
53+ run : |
54+ cd beta
55+ git config --global user.name 'github-actions[bot]'
56+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
57+ git add HTMLPlayerBeta
58+ if git diff --staged --quiet; then
59+ echo "No changes to commit"
60+ else
61+ git commit -m "Deploy HTMLPlayer build from updates branch"
62+ git push origin main
63+ fi
You can’t perform that action at this time.
0 commit comments