File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,12 +3,20 @@ name: Deploy to GitHub Pages
33on :
44 push :
55 branches :
6- - main
6+ - master
77
88jobs :
99 deploy :
1010 runs-on : ubuntu-latest
1111
12+ permissions :
13+ pages : write
14+ id-token : write
15+
16+ environment :
17+ name : github-pages
18+ url : ${{ steps.deployment.outputs.page_url }}
19+
1220 steps :
1321 - name : Checkout repository
1422 uses : actions/checkout@v4
2432 - name : Build project
2533 run : npm run build
2634
27- - name : Deploy to gh-pages
28- env :
29- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30- run : |
31- npx gh-pages -d build -r https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
35+ - name : Add CNAME file to build directory
36+ run : echo "darkvoid.cc" > build/CNAME
37+
38+ - name : Setup Pages
39+ uses : actions/configure-pages@v4
40+
41+ - name : Upload artifact
42+ uses : actions/upload-pages-artifact@v3
43+ with :
44+ path : ./build
45+
46+ - name : Deploy to GitHub Pages
47+ id : deployment
48+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments