diff --git a/.github/workflows/firebase-hosting-live-channel.yml b/.github/workflows/firebase-hosting-live-channel.yml new file mode 100644 index 0000000..23b4001 --- /dev/null +++ b/.github/workflows/firebase-hosting-live-channel.yml @@ -0,0 +1,17 @@ +name: Deploy commit to Firebase Hosting live channel +'on': + push: + branches: + - master +jobs: + build_and_deploy_to_live: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npm run build + - uses: w9jds/firebase-action@v2.0.0 + with: + args: deploy --only hosting + env: + GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRED_CA431 }}' diff --git a/.github/workflows/firebase-hosting-preview-channel.yml b/.github/workflows/firebase-hosting-preview-channel.yml new file mode 100644 index 0000000..f8e2493 --- /dev/null +++ b/.github/workflows/firebase-hosting-preview-channel.yml @@ -0,0 +1,14 @@ +name: Deploy commit to new Firebase Hosting preview channel +'on': push +jobs: + build_and_deploy_to_preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - run: npm run build + - uses: w9jds/firebase-action@v2.0.0 + with: + args: hosting:channel:deploy preview-$GITHUB_SHA --expires 14d + env: + GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRED_CA431 }}' diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml deleted file mode 100644 index c9666c3..0000000 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ /dev/null @@ -1,18 +0,0 @@ -# This file was auto-generated by the Firebase CLI -# https://github.com/firebase/firebase-tools - -name: Deploy to Firebase Hosting on PR -'on': [push] -jobs: - build_and_preview: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: npm install - - run: npm run build - - uses: FirebaseExtended/action-hosting-deploy@v0 - with: - repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRED_CA431 }}' - projectId: fred-ca431 - channelId: preview