Open mikesol opened 2 years ago
@mikesol
You can handle with target input
, .firebaserc
and firebase.json
Something like below
firebase_hosting_preview:
needs: build_web
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
build-dir: [
./build/application
./build/docs
]
steps:
### ...
- name: Preview Web
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_** }}'
## Somthing you should consider
target: ${{ matrix.build-dir }}
channelId: ${{github.sha}}
https://github.com/FirebaseExtended/action-hosting-deploy#target-string
https://firebase.google.com/docs/hosting/multisites
Have a nice day!
The use case you're trying to solve
I'm looking to deploy two previews for each PR: one that has the minified production build to make sure everything works, and one with the debug build to dig in if there are any problems.
Change to the action that would solve that use case
If it were possible to run this action multiple times with different
channelId
-s and have both of them reported to the PR, that would be ideal. I'm pretty sure the only thing that would need to be added is an environment variable with the current channel ID so that one could append stuff to it (ie-debug
) for a second build. Although I haven't tried double-building yet so perhaps there are other considerations as well. Thanks!