Skip to content

Commit 59a738d

Browse files
committed
Clean up cd
1 parent 7f2e4fb commit 59a738d

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

.github/workflows/cd.yml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,10 @@ jobs:
99
name: Deploy
1010
runs-on: ubuntu-latest
1111
permissions:
12+
# Needed to produce an OIDC token, which is used for Workload Identity Federation with Google Cloud
1213
id-token: write
1314
contents: read
14-
1515
steps:
16-
# - name: Checkout actions-oidc-debugger
17-
# uses: actions/checkout@v3
18-
# with:
19-
# repository: github/actions-oidc-debugger
20-
# ref: main
21-
# # token: ${{ secrets.your-checkout-token }}
22-
# path: ./.github/actions/actions-oidc-debugger
23-
# - name: Debug OIDC Claims
24-
# uses: ./.github/actions/actions-oidc-debugger
25-
# with:
26-
# audience: '${{ github.server_url }}/${{ github.repository_owner }}'
27-
2816
- name: Check out repo
2917
uses: actions/checkout@v4
3018
with:
@@ -35,13 +23,6 @@ jobs:
3523
node-version: '20.x'
3624
- name: Install firebase-tools
3725
run: npm install -g firebase-tools
38-
# - name: Authenticate to Google
39-
# uses: 'google-github-actions/auth@v2'
40-
# with:
41-
# credentials_json: ${{ secrets.GCP_SA_KEY }}
42-
# create_credentials_file: true
43-
# export_environment_variables: true
44-
# cleanup_credentials: true
4526
- name: Authenticate to Google
4627
uses: 'google-github-actions/auth@v2'
4728
with:
@@ -51,24 +32,17 @@ jobs:
5132
create_credentials_file: true
5233
export_environment_variables: true
5334
cleanup_credentials: true
54-
- name: List firebase projects
55-
run: firebase projects:list
56-
- name: Output auth details
57-
run: cat $GOOGLE_APPLICATION_CREDENTIALS
5835
- name: Install dependencies
5936
run: npm install
6037
working-directory: checkout-prefix
6138
- name: Build
6239
run: npm run build
6340
working-directory: checkout-prefix
64-
# - name: Output directory
65-
# run: ls
66-
# - name: Output checkout directory
67-
# run: ls checkout-prefix
6841
- name: Deploy functions
42+
id: deployFunctions
6943
run: npm run deploy
7044
working-directory: checkout-prefix
71-
- name: Output firebase debug log
72-
if: always()
45+
- name: Output firebase debug log on deployment failure
46+
if: always() && (steps.deployFunctions.outcome == 'failure')
7347
run: cat firebase-debug.log
7448
working-directory: checkout-prefix

0 commit comments

Comments
 (0)