-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4017d44
commit 7ba5ea8
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Deploy Production | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
permissions: | ||
contents: read | ||
actions: read | ||
uses: ./.github/workflows/backoffice_test_workflow.yaml | ||
|
||
build_and_deploy: | ||
needs: test | ||
permissions: | ||
contents: read | ||
actions: read | ||
uses: ./.github/workflows/backoffice_deploy_workflow.yaml | ||
with: | ||
environment: 'production' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy Staging | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- vivien/backoffice-ci | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
permissions: | ||
contents: read | ||
actions: read | ||
uses: ./.github/workflows/backoffice_test_workflow.yaml | ||
|
||
build_and_deploy: | ||
needs: test | ||
permissions: | ||
contents: read | ||
actions: read | ||
uses: ./.github/workflows/backoffice_deploy_workflow.yaml | ||
with: | ||
environment: 'staging' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Deploy BackOffice | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
type: string | ||
description: 'Github environment to use' | ||
required: true | ||
|
||
jobs: | ||
build_backoffice: | ||
name: Build BackOffice | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies using yarn --frozen-lockfile | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
working-directory: marble-backoffice | ||
- name: 'Build ${{ inputs.environment }}' | ||
run: 'yarn build-${{ inputs.environment }}' | ||
working-directory: marble-backoffice | ||
- name: Deploy to Firebase | ||
uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.GCP_SA_KEY }}' | ||
projectId: '${{ inputs.environment }}' | ||
channelId: live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Test Backoffice | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test_backoffice: | ||
name: Test BackOffice | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: bahmutov/npm-install@v1 | ||
with: | ||
working-directory: marble-backoffice | ||
- name: typecheck | ||
run: yarn tsc --noEmit | ||
working-directory: marble-backoffice | ||
- name: Test | ||
run: yarn test | ||
working-directory: marble-backoffice |