Skip to content

Commit

Permalink
Merge pull request #3 from johnnygerard:workflows
Browse files Browse the repository at this point in the history
ci: update workflows
  • Loading branch information
johnnygerard committed May 22, 2024
2 parents cc43965 + 6db41ab commit 6869475
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/firebase-preview-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/firebase-production-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 6869475

Please sign in to comment.