Skip to content

Commit

Permalink
deploy: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KeidsID committed Mar 25, 2024
1 parent 4e5eb82 commit 797bb3a
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- "**/*.yml"

pull_request:
branches: [main]
types: [review_requested]
paths-ignore:
- "**/*.md"
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/web-preview.yml
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: .
22 changes: 15 additions & 7 deletions .github/workflows/web-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
.vercel
6 changes: 3 additions & 3 deletions lib/infrastructures/repos/auth_repo_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ class AuthRepoImpl implements AuthRepo {
abstract class _AuthService extends ChopperService {
static _AuthService create([ChopperClient? client]) => _$_AuthService(client);

/// Valid [body] value:
///
/// Valid [body] value:
///
/// ```json
/// {
/// "name": "String",
Expand All @@ -138,7 +138,7 @@ abstract class _AuthService extends ChopperService {
});

/// Valid [body] value:
///
///
/// ```json
/// {
/// "email": "String",
Expand Down

0 comments on commit 797bb3a

Please sign in to comment.