🔊 Add more detail to debug log #51
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
name: Deploy Functions | |
on: | |
push: | |
branches: main | |
paths: | |
- 'functions/**' | |
- 'firebase.*' | |
- '.github/workflows/functions-deploy.yml' | |
jobs: | |
build-functions: | |
uses: ./.github/workflows/functions-test.yml | |
secrets: | |
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }} | |
deploy-functions: | |
name: Deploy functions | |
runs-on: ubuntu-latest | |
needs: build-functions | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use specified Node version | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'functions/.nvmrc' | |
- name: Install dependencies | |
run: | | |
yarn --cwd ./functions/ | |
rm ./functions/pnpm-lock.yaml | |
- name: Get commit message | |
run: | | |
MSG="${{ github.event.head_commit.message }}" | |
echo "commit_msg=${MSG%%$'\n'*}" >> "$GITHUB_ENV" | |
- name: Deploy functions | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy --only functions --message \"${{ env.commit_msg }}\" | |
env: | |
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | |
PROJECT_ID: ben-keys-spotify-tools |