diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ffe828b..8ccd437 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,16 +8,23 @@ on: jobs: deploy: runs-on: ubuntu-latest - steps: - - name: Checkout Repository + - name: Checkout code uses: actions/checkout@v2 - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@master + - name: Authenticate gcloud + uses: google-github-actions/auth@v2.1.0 with: - service_account_key: ${{ secrets.GCP_SA_KEY }} + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v2.1.0 + with: + version: '479.0.0' # Update with the appropriate version project_id: showcase-function + install_components: 'beta' # Install additional components if required + skip_install: false - name: Deploy Cloud Function - run: gcloud functions deploy ExchangeTokenFunction --runtime nodejs20 --trigger-http --allow-unauthenticated + run: | + gcloud functions deploy ExchangeTokenFunction --runtime nodejs20 --trigger-http --allow-unauthenticated