Skip to content

Commit 7fca0be

Browse files
committed
updated workflow
1 parent 88c4cc3 commit 7fca0be

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy Flutter Web to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- prod
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
# Build job
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Flutter
28+
uses: subosito/flutter-action@v2
29+
with:
30+
flutter-version: '3.19.0'
31+
channel: 'stable'
32+
33+
- name: Install dependencies
34+
run: flutter pub get
35+
36+
- name: Build web
37+
run: flutter build web --base-href "/talawa_leaderboard/"
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: 'build/web'
43+
44+
# Deployment job
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)