Skip to content

Commit 859ce95

Browse files
committed
feat: create CD action
This action deploys the main branch to GitHub Pages when pushed to.
1 parent 037ef7f commit 859ce95

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/cd.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CD
2+
3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
8+
on:
9+
push:
10+
branches: ["main"]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: subosito/flutter-action@v2
19+
with:
20+
channel: stable
21+
- name: Flutter Build Web
22+
run: flutter build web --release
23+
- name: Upload Artifact
24+
uses: actions/[email protected]
25+
with:
26+
path: build/web
27+
28+
deploy:
29+
runs-on: ubuntu-latest
30+
needs: build
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
steps:
35+
- name: Deploy to GitHub Pages
36+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)