File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+ workflow_dispatch :
9+
10+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+ concurrency :
19+ group : " pages"
20+ cancel-in-progress : false
21+
22+ jobs :
23+ # Build job
24+ build :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v4
29+
30+ - name : Setup Python
31+ uses : actions/setup-python@v4
32+ with :
33+ python-version : ' 3.x'
34+
35+ - name : Setup Just
36+ uses : extractions/setup-just@v3
37+
38+ - name : Build project
39+ run : |
40+ just build-new
41+
42+ - name : Prepare GitHub Pages content
43+ run : |
44+ # Copy standalone build to pages directory
45+ mkdir -p pages
46+ cp -r dist/standalone/* pages/
47+
48+ # Ensure index.html exists
49+ if [ ! -f pages/index.html ]; then
50+ cp pages/standalone.html pages/index.html
51+ fi
52+
53+ - name : Setup Pages
54+ uses : actions/configure-pages@v4
55+
56+ - name : Upload artifact
57+ uses : actions/upload-pages-artifact@v3
58+ with :
59+ path : ' ./pages'
60+
61+ # Deployment job
62+ deploy :
63+ environment :
64+ name : github-pages
65+ url : ${{ steps.deployment.outputs.page_url }}
66+ runs-on : ubuntu-latest
67+ needs : build
68+ if : github.ref == 'refs/heads/main'
69+ steps :
70+ - name : Deploy to GitHub Pages
71+ id : deployment
72+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments