diff --git a/.github/workflows/firebase-preview-deployment.yaml b/.github/workflows/firebase-preview-deployment.yaml index ed11000..1003e6d 100644 --- a/.github/workflows/firebase-preview-deployment.yaml +++ b/.github/workflows/firebase-preview-deployment.yaml @@ -2,7 +2,7 @@ # Firebase CLI repository: https://github.com/firebase/firebase-tools # Command: firebase init hosting -name: Deploy to Firebase Hosting on PR +name: Firebase Hosting preview deployment on: pull_request permissions: checks: write @@ -12,6 +12,9 @@ jobs: build_and_preview: if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} runs-on: ubuntu-latest + environment: + name: preview + url: ${{ steps.deploy.outputs.details_url }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -20,6 +23,7 @@ jobs: cache: "npm" - run: npm ci && npx ng version && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 + id: deploy with: repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HELLO_WORLD_F3218 }} diff --git a/.github/workflows/firebase-production-deployment.yaml b/.github/workflows/firebase-production-deployment.yaml index 34abb51..15b14ff 100644 --- a/.github/workflows/firebase-production-deployment.yaml +++ b/.github/workflows/firebase-production-deployment.yaml @@ -2,14 +2,16 @@ # Firebase CLI repository: https://github.com/firebase/firebase-tools # Command: firebase init hosting -name: Deploy to Firebase Hosting on merge +name: Firebase Hosting production deployment on: - push: - branches: - - main + release: + types: [released] jobs: build_and_deploy: runs-on: ubuntu-latest + environment: + name: production + url: ${{ steps.deploy.outputs.details_url }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -18,6 +20,7 @@ jobs: cache: "npm" - run: npm ci && npx ng version && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 + id: deploy with: repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HELLO_WORLD_F3218 }}