-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ on: | |
- "**/*.yml" | ||
|
||
pull_request: | ||
branches: [main] | ||
types: [review_requested] | ||
paths-ignore: | ||
- "**/*.md" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Web Preview | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [review_requested] | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.yaml" | ||
- "**/*.yml" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📚 Git Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🐦 Setup Flutter SDK v3.10.x | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: 3.10.x | ||
channel: stable | ||
cache: true | ||
|
||
- name: 📦 Get dependencies | ||
run: flutter pub get | ||
|
||
- name: ⚙️ Setup environment | ||
run: | | ||
dart run build_runner build -d | ||
- name: 🏗️ Build web | ||
run: flutter build web --profile --web-renderer canvaskit | ||
|
||
- name: 📝 Deploy preview | ||
uses: amondnet/vercel-action@v25 | ||
with: | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
working-directory: . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
|
||
- name: 🏗️ Build web release | ||
run: | | ||
flutter build web --release --base-href --web-renderer canvaskit | ||
flutter build web --release --web-renderer canvaskit | ||
- name: 📝 Upload build | ||
uses: actions/upload-artifact@v2 | ||
|
@@ -44,6 +44,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📚 Git Checkout "web-release" branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: web-release | ||
|
||
- name: 📝 Download build | ||
uses: actions/download-artifact@v2 | ||
with: | ||
|
@@ -56,9 +61,12 @@ jobs: | |
run: | | ||
echo "TAG_NAME=deploy-{TAG_NAME}" >> "${GITHUB_OUTPUT}" | ||
- name: 📚 Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build | ||
tag_name: ${{ steps.setup_tag.outputs.TAG_NAME }} | ||
- name: 📚 Push build to web-release branch | ||
env: | ||
BUILD_VER: ${{steps.setup_tag.outputs.TAG_NAME}} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "KeidsID" | ||
git add . | ||
git commit -m "web release build v${{env.BUILD_VER}}" | ||
git push origin web-release |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ app.*.map.json | |
/android/app/debug | ||
/android/app/profile | ||
/android/app/release | ||
.vercel |
This file contains 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