File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy
2+ on :
3+ push :
4+ branches :
5+ - main
6+ permissions :
7+ contents : write
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+ - name : Setup Node
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : ' 16'
19+ - name : Install Dependencies
20+ run : npm install
21+ - name : Build
22+ run : npm run build
23+ - name : Configure Git
24+ run : |
25+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
26+ git config --global user.name "github-actions[bot]"
27+ - name : Deploy to GitHub Pages
28+ env :
29+ CI : true
30+ GIT_USER : github-actions[bot] # Add user for gh-pages package
31+ GITHUB_TOKEN : ${{ github.token }} # Authenticate with the token
32+ run : npx gh-pages -d build --repo https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git
33+
34+
You can’t perform that action at this time.
0 commit comments