From 59c6d97c4115c6ae2b04618d4786c16ac09672cd Mon Sep 17 00:00:00 2001 From: stdavis Date: Fri, 23 Aug 2024 09:34:10 -0600 Subject: [PATCH] ci: install function deps before deploy --- .github/workflows/pull_request.yml | 4 ++++ .github/workflows/release.yml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 805df81..9587486 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -75,6 +75,10 @@ jobs: service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} project-id: ${{ secrets.PROJECT_ID }} preview: yes + prebuild-command: | + cd functions + npm ci + cd .. build-command: npm run build -- --mode dev repo-token: ${{ secrets.GITHUB_TOKEN }} env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00d25bf..6f3f264 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,10 @@ jobs: identity-provider: ${{ secrets.IDENTITY_PROVIDER }} service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} project-id: ${{ secrets.PROJECT_ID }} + prebuild-command: | + cd functions + npm ci + cd .. build-command: npm run build -- --mode dev env: VITE_DISCOVER: ${{ secrets.DISCOVER }} @@ -50,6 +54,10 @@ jobs: identity-provider: ${{ secrets.IDENTITY_PROVIDER }} service-account-email: ${{ secrets.SERVICE_ACCOUNT_EMAIL }} project-id: ${{ secrets.PROJECT_ID }} + prebuild-command: | + cd functions + npm ci + cd .. build-command: npm run build -- --mode production service-now-instance: ${{ secrets.SN_INSTANCE }} service-now-table: ${{ secrets.SN_TABLE }}