Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use npm to deploy to firebase #236

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/firebase-hosting-m.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ jobs:

- name: Deploy firebase live hosting
id: deployStep
uses: FirebaseExtended/[email protected]
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_ANGULAR_MOVIES_A12D3 }}
projectId: angular-movies-a12d3
channelId: ${{ github.head_ref }}
# We can not use the firebase github action as it throws because of "channelID requires"
# ${{ fromJson(steps.deployStep.outputs.urls)[0] }} // @TODO figure out why outputs urls are different from `https://angular-movies-a12d3.web.app`
run: |
npm run nx run firebase-function:deploy

- name: Test firebase live hosting
id: firebase-live-hosting
Expand All @@ -38,5 +36,4 @@ jobs:
commentId: firebase-live-hosting
verbose: on
url: https://angular-movies-a12d3.web.app
# url: ${{ fromJson(steps.deployStep.outputs.urls)[0] }} // @TODO figure out why outputs urls are different from `https://angular-movies-a12d3.web.app`
rcPath: ./projects/movies-user-flows/.user-flowrc.json
23 changes: 18 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,26 @@ The CI has different actions:

- `pr` - `pull_request` on `main`
- `m` - `merge` on `main`
-

The CI has different actions:
### Docs

- `ci.yml` - runs on `pr` and `m` --affected build,test,lint
- `docs-hosting-m.yml` - runs on `m`

### Test and Build

- `ci.yml` - runs on `pr` and `m` --affected build,test,lint

#### Firebase Hosting

- `firebase-hosting-m.yml` - runs on `m` firebase-function:deploy + movies:user-flow:production,
- `cloudflare-hosting-pr.yml` - runs on `pr` cloudflare-worker:deploy + cloudflare-worker:user-flow:emulate,
- `firebase-hosting-pr.yml` - runs on `pr` ng-universal-express:deploy + ng-universal-express:user-flow:preview
- `firebase-function-pr.yml` - runs on `pr` firebase-function:build + firebase-function:user-flow:emulate,

#### Firebase Function

As the build will not break because of require usage we need to test against function emulator

- `firebase-function-pr.yml` - runs on `pr` firebase-function:build + firebase-function:user-flow:emulate,

#### Cloudflare Hosting

- `cloudflare-hosting-pr.yml` - runs on `pr` cloudflare-worker:deploy + cloudflare-worker:user-flow:emulate,
Loading