Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0492e9e

Browse files
committed
ci: add GitHub Actions workflow for web deploy
- Deploys web app on new release - Builds web app with Flutter - Uses GitHub Pages for deployment
1 parent 3f2baed commit 0492e9e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

‎.github/workflows/deploy.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: deploy
2+
3+
# Run this workflow when a new release is published
4+
on:
5+
release:
6+
types: [published]
7+
jobs:
8+
build_and_deploy:
9+
runs-on: ubuntu-latest # Use the latest version of Ubuntu
10+
11+
steps:
12+
# 1. Checkout the repository code
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
# 2. Setup Flutter SDK
17+
- name: Setup Flutter
18+
uses: subosito/flutter-action@v2
19+
with:
20+
channel: 'stable' # Use the stable channel of Flutter
21+
22+
# 3. Get Flutter dependencies
23+
- name: Get dependencies
24+
run: flutter pub get
25+
26+
# 4. Build the Flutter web app
27+
- name: Build Web App
28+
run: flutter build web --release --base-href /ht-main/
29+
30+
# 5. Deploy the built app to GitHub Pages
31+
- name: Deploy
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./build/web

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /