Skip to content

Commit

Permalink
Cloudflare deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-diaz committed Sep 20, 2024
1 parent fd3a689 commit 6268f70
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 36 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/deploy_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ jobs:
- run: npm ci
- run: npm install @angular/cli
- run: npx ng build
- uses: FirebaseExtended/action-hosting-deploy@v0
- run: cp _redirects dist/ctrl/_redirects
- uses: cloudflare/wrangler-action@v3
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: ctrl-b357a
channelId: 'live'
wranglerVersion: '3'
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# Use branch name to indicate Cloudflare environment: (main | staging)
# Cloudflare does not deploy by itself so the value is only used to
# determine the target environment according to defined rules.
command: pages deploy dist/ctrl --project-name=ctrl --branch=main
15 changes: 9 additions & 6 deletions .github/workflows/deploy_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ jobs:
- run: npm ci
- run: npm install @angular/cli
- run: npx ng build
- uses: FirebaseExtended/action-hosting-deploy@v0
- run: cp _redirects dist/ctrl/_redirects
- uses: cloudflare/wrangler-action@v3
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: ctrl-b357a
expires: 7d
channelId: staging
wranglerVersion: '3'
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# Use branch name to indicate Cloudflare environment: (main | staging)
# Cloudflare does not deploy by itself so the value is only used to
# determine the target environment according to defined rules.
command: pages deploy dist/ctrl --project-name=ctrl --branch=staging
25 changes: 0 additions & 25 deletions .github/workflows/deploy_testing.yaml

This file was deleted.

1 change: 1 addition & 0 deletions _redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* /index.html

0 comments on commit 6268f70

Please sign in to comment.