Skip to content

Instantly share code, notes, and snippets.

@salihgueler
Last active July 18, 2022 09:57
Show Gist options
  • Save salihgueler/af7221c8e18a7f8d87b5cf1b56ec26bd to your computer and use it in GitHub Desktop.
Save salihgueler/af7221c8e18a7f8d87b5cf1b56ec26bd to your computer and use it in GitHub Desktop.
Deploy Website
name: On Website Deploy
"on":
push:
# (1)
branches:
- "main"
jobs:
build_and_deploy_web:
name: Build & Deploy Flutter to Web
runs-on: ubuntu-latest
# (2)
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: 🌍 Enable Web
run: flutter config --enable-web
- name: 📦 Get packages
run: flutter pub get
- name: 🏭 Build Web Application
run: flutter build web --release
# (3)
- name: Make copy of artifacts
run: |
chmod u+x "${GITHUB_WORKSPACE}/createandcopytofolder.sh"
bash "${GITHUB_WORKSPACE}/createandcopytofolder.sh"
# (4)
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Commit the artifacts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment