Created
June 7, 2021 00:04
-
-
Save hscheuerle/346acae026a6bdde9e104c1665f722bc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
name: Deploy to Firebase Hosting on PR | |
"on": pull_request | |
jobs: | |
build_and_preview: | |
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}" | |
runs-on: ubuntu-latest | |
env: | |
IDS: '{ master: "hscheue-workspace", development: "work-development-6804b" }' | |
SA: '{ master: "FIREBASE_SERVICE_ACCOUNT_HSCHEUE_WORKSPACE", development: "FIREBASE_SERVICE_ACCOUNT_WORK_DEVELOPMENT_6804B" }' | |
C: '{ master: "production", development: "development" }' | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm ci | |
- run: npm run build -c "${{ fromJson(env.C)[github.base_ref] }}" | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets[fromJson(env.SA)[github.base_ref]] }}" | |
projectId: "${{ fromJson(env.IDS)[github.base_ref] }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment