-
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
3c80c59
commit 22f1e4d
Showing
2 changed files
with
81 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,62 @@ | ||
name: Deploy BackOffice Staging | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - master | ||
# tags: | ||
# - "v[0-9]+.[0-9]+.[0-9]+" | ||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
debug: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: display github.ref | ||
run: echo ${{ github.ref }} | ||
build_backoffice_staging: | ||
# if: github.ref == 'refs/heads/master' | ||
name: Build BackOffice Staging | ||
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 | ||
env: | ||
NODE_ENV: production | ||
- name: Build staging | ||
run: yarn build-staging | ||
working-directory: marble-backoffice | ||
- name: Upload staging build files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: staging-files | ||
path: ./marble-backoffice/dist | ||
|
||
## firebase deploy --project staging --only hosting | ||
deploy_backoffice_staging: | ||
# if: github.ref == 'refs/heads/master' | ||
name: Deploy BackOffice Staging | ||
needs: build_backoffice_staging | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: staging-files | ||
path: ./marble-backoffice/dist | ||
- name: Deploy to Firebase Staging | ||
uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }} | ||
projectId: staging | ||
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,19 @@ | ||
name: Test Backoffice | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build_backoffice_staging: | ||
name: Build BackOffice Staging | ||
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 |