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- # Simple workflow for deploying static content to GitHub Pages
21name : Deploy static content to Pages
32
43on :
54 # Runs on pushes targeting the default branch
65 push :
76 branches : ['main']
8-
97 # Allows you to run this workflow manually from the Actions tab
108 workflow_dispatch :
119
12- # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
1310permissions :
1411 contents : read
1512 pages : write
1613 id-token : write
1714
18- # Allow one concurrent deployment
1915concurrency :
2016 group : ' pages'
2117 cancel-in-progress : true
2218
2319jobs :
24- # Single deploy job since we're just deploying
2520 deploy :
2621 environment :
2722 name : github-pages
2823 url : ${{ steps.deployment.outputs.page_url }}
2924 runs-on : ubuntu-latest
3025 steps :
31- - name : Checkout
26+ - name : Checkout repository
3227 uses : actions/checkout@v4
28+
3329 - name : Set up Node
3430 uses : actions/setup-node@v3
3531 with :
3632 node-version : 18
3733 cache : ' npm'
34+
3835 - name : Install dependencies
3936 run : npm install
40- - name : Build
37+
38+ - name : Build the site
4139 run : npm run build
42- - name : Setup Pages
43- uses : actions/configure-pages@v3
44- - name : Upload artifact
40+
41+ - name : Verify dist folder exists
42+ run : ls -l ./dist
43+
44+ - name : Upload artifact for Pages
4545 uses : actions/upload-pages-artifact@v2
4646 with :
47- # Upload dist repository
4847 path : ' ./dist'
48+
4949 - name : Deploy to GitHub Pages
5050 id : deployment
51- uses : actions/deploy-pages@v2
51+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments