Skip to content

Commit 17ffeb1

Browse files
committed
chore: added gh workflows
1 parent 90dfacf commit 17ffeb1

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: subosito/flutter-action@v2
24+
with:
25+
channel: stable
26+
27+
- name: Install Jaspr CLI
28+
run: dart pub global activate jaspr_cli
29+
30+
- name: Get dependencies
31+
run: flutter pub get
32+
33+
- name: Build static site
34+
run: dart run jaspr build
35+
36+
# Fix: copy index.html → 404.html so GitHub Pages serves the app
37+
# for any direct URL (e.g. /whoami/creation refreshed in browser)
38+
- name: Copy index.html to 404.html
39+
run: cp build/jaspr/index.html build/jaspr/404.html
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: build/jaspr
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)