-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployments to GCP not working #1
Comments
I faced the same issue. I've configured the following Github Actions to deploy to gcf. name: Deploy on GCF (Production)
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Read .nvmrc file
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Install dependencies
run: |
npm i
- name: Build
run: |
npm ci --legacy-peer-deps
npm run build
- name: Setup Google Cloud
uses: actions-hub/gcloud@master
env:
PROJECT_ID: ${{ secrets.GOOGLE_PROJECT_ID_PROD }}
APPLICATION_CREDENTIALS: ${{ secrets.GCLOUD_SERVICE_KEY_PROD }}
- name: Delpoy to GCP
uses: actions-hub/gcloud@master
with:
args: |
functions deploy \
--project ${{ secrets.GOOGLE_PROJECT_ID_PROD }} \
functionName \
--entry-point handler \
--trigger-http \
--runtime nodejs12 \
--memory=128MB \
--allow-unauthenticated I also needed to create my own I hope it helps. |
Update: I got this working, and forked this repo and made some updates. (The file rename above, and changes to the README and update to Node 16.) Here's my fork: https://github.com/antun/nextjs-google-cloud-functions Here's the PR: #2 @marceloogeda I'm looking at your GitHub Action, and I don't see anything significantly different from the deployment command I'm using:
I've also renamed
|
…m run dev does *not* work.
Upon running
npm run deploy
the following error is presented:After changing
server.js
tofunction.js
the following error is presented:The text was updated successfully, but these errors were encountered: