Skip to content

Commit

Permalink
Add CD for pos
Browse files Browse the repository at this point in the history
  • Loading branch information
toririm committed Feb 1, 2025
1 parent 7c4cf66 commit 609b143
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pos-deploy-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: pos / deploy

on:
push:
branches:
- main
paths:
- "services/pos/**"
- "modules/common/**"
- ".github/workflows/pos-deploy-merge.yml"

defaults:
run:
working-directory: services/pos

jobs:
deploy:
name: Deploy to Firebase Hosting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: './.github/actions/setup-deps'
- run: pnpm run build
env:
VITE_WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CAFEORE_2024 }}
channelId: live
projectId: cafeore-2024
entryPoint: "pos"
36 changes: 36 additions & 0 deletions .github/workflows/pos-deploy-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: pos / preview
on:
pull_request:
paths:
- "services/pos/**"
- "modules/common/**"
- ".github/workflows/pos-deploy-pull-request.yml"

defaults:
run:
working-directory: services/pos

permissions:
checks: write
contents: read
pull-requests: write

jobs:
build_and_preview:
name: Deploy to Firebase Hosting
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: './.github/actions/setup-deps'
- run: pnpm run build
env:
VITE_WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CAFEORE_2024 }}
projectId: cafeore-2024
entryPoint: "pos"

0 comments on commit 609b143

Please sign in to comment.