mirror of
https://github.com/tiennm99/loto.git
synced 2026-08-31 22:23:49 +00:00
GitHub only runs workflows from .github/workflows at the root, so the six workflows inherited from the two projects have to live there rather than under web/ and android/. Each one gets a path filter so web-only changes do not trigger Android builds, a working directory for its subproject, and a prefixed filename to keep the two sets apart. Gradle now sits at android/android, the Firebase action reads its config from web/ via entryPoint, and the Android checkout no longer needs submodules.
29 lines
902 B
YAML
29 lines
902 B
YAML
# Originally generated by the Firebase CLI
|
|
# https://github.com/firebase/firebase-tools
|
|
# entryPoint points the action at web/, where firebase.json and .firebaserc live.
|
|
|
|
name: web / deploy to Firebase Hosting on PR
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'web/**'
|
|
- '.github/workflows/web-firebase-hosting-pull-request.yml'
|
|
permissions:
|
|
checks: write
|
|
contents: read
|
|
pull-requests: write
|
|
jobs:
|
|
build_and_preview:
|
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- run: npm ci && npm run build
|
|
working-directory: web
|
|
- uses: FirebaseExtended/action-hosting-deploy@v0
|
|
with:
|
|
repoToken: ${{ secrets.GITHUB_TOKEN }}
|
|
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_LOOTOO }}
|
|
projectId: lootoo
|
|
entryPoint: web
|