File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : deploy
2+ on :
3+ push :
4+ branches :
5+ - master
6+ jobs :
7+ deploy :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+ - uses : actions/setup-node@v4
12+ with :
13+ node-version : ' 20.15.x'
14+ - name : setup git auth
15+ env :
16+ email : ${{ secrets.GH_EMAIL }}
17+ username : ${{ secrets.GH_USERNAME }}
18+ access_token : ${{ secrets.GH_ACCESS_TOKEN }}
19+ run : |
20+ git config --global credential.helper store
21+ echo "https://${access_token}:x-oauth-basic@github.com" > ~/.git-credentials
22+ git config --global user.email $email
23+ git config --global user.name $username
24+ - name : deploy to build
25+ run : |
26+ npm i
27+ NODE_ENV=production npm run build
28+ cd dist
29+ git init
30+ git add -A
31+ git commit -m "🚀 Deploy id ${GITHUB_RUN_ID}"
32+ git push -f "https://github.com/${GITHUB_REPOSITORY}.git" master:gh-pages
You can’t perform that action at this time.
0 commit comments