Skip to content

Commit

Permalink
Switch circleci with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Jan 2, 2025
1 parent 66f9e2c commit 62beecf
Show file tree
Hide file tree
Showing 7 changed files with 19,119 additions and 22,681 deletions.
111 changes: 0 additions & 111 deletions .circleci/config.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Build PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 10.24
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VEHICLE_MAP_DEMO_DEV }}'
projectId: vehicle-map-demo-dev
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Build
'on':
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 10.24
- run: npm ci && npm run build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: |
build
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy

on:
workflow_run:
workflows: [Build]
types:
- completed

jobs:
deploy_dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
name: build
path: build
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VEHICLE_MAP_DEMO_DEV }}'
channelId: live
projectId: vehicle-map-demo-dev
deploy_staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
name: build
path: build
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VEHICLE_MAP_DEMO_STAGING }}'
channelId: live
projectId: vehicle-map-demo-staging
deploy_prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
name: build
path: build
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VEHICLE_MAP_DEMO_PROD }}'
channelId: live
projectId: vehicle-map-demo-prod
16 changes: 16 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VEHICLE_MAP_DEMO_STAGING }}'
projectId: vehicle-map-demo-staging
1 change: 0 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"hosting": {
"public": "build",
Expand Down
Loading

0 comments on commit 62beecf

Please sign in to comment.