Skip to content

Commit 0e68a4b

Browse files
authored
feat: create CD action
This action deploys the main branch to GitHub Pages when pushed to.
1 parent 037ef7f commit 0e68a4b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/cd.yml

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

0 commit comments

Comments
 (0)