File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1- # This file was auto-generated by the Firebase CLI
2- # https://github.com/firebase/firebase-tools
3-
41name : Deploy to Firebase Hosting on merge
52on :
6- push :
7- branches :
8- - main
3+ push
4+
95jobs :
106 build_and_deploy :
117 runs-on : ubuntu-latest
2117 - name : Build Deno SPA
2218 run : |
2319 deno install --allow-scripts --reload
24- deno task build:app
20+ VITE_API_URL=https://api.nanoapi.io deno task build:app
2521
26- - uses : FirebaseExtended/action-hosting-deploy@v0
22+ - name : Deploy to Firebase
23+ # only deploy on main branch
24+ if : github.ref == 'refs/heads/main'
25+ uses : FirebaseExtended/action-hosting-deploy@v0
2726 with :
2827 entryPoint : " ./packages/app"
2928 repoToken : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11name : Build and Push Docker Image
22
33on :
4- push :
5- branches : [main]
4+ push
65
76env :
87 GITHUB_REGISTRY : ghcr.io
5352
5453 # Build and push to both registries
5554 - name : Build and push Docker image
55+ # only build on main branch
56+ if : github.ref == 'refs/heads/main'
5657 uses : docker/build-push-action@v5
5758 with :
5859 context : packages/core
6667
6768 # Output the image URLs for easy reference
6869 - name : Output image URLs
70+ # only output on main branch
71+ if : github.ref == 'refs/heads/main'
6972 run : |
7073 echo "Images pushed to:"
7174 echo "GitHub: ${{ env.GITHUB_REGISTRY }}/${{ env.GITHUB_IMAGE_NAME }}:${{ github.ref_name }}"
7578
7679 # Update Cloud Run service with the new image
7780 - name : Deploy to Cloud Run
81+ # only deploy on main branch
82+ if : github.ref == 'refs/heads/main'
7883 run : |
7984 gcloud run deploy stackcore-core \
8085 --image=${{ env.GCP_REGISTRY }}/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_REPOSITORY }}/${{ env.GCP_IMAGE_NAME }}:${{ github.ref_name }} \
You can’t perform that action at this time.
0 commit comments