docs: add live demo badge to README #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
# Run this workflow when a push is made to the main branch | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest # Use the latest version of Ubuntu | |
steps: | |
# 1. Checkout the repository code | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# 2. Setup Flutter SDK | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' # Use the stable channel of Flutter | |
# 3. Get Flutter dependencies | |
- name: Get dependencies | |
run: flutter pub get | |
# 4. Build the Flutter web app | |
- name: Build Web App | |
run: flutter build web --release --base-href /ht-main/ | |
# 5. Deploy the built app to GitHub Pages | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/web |