From 1ee600a79660f1ff9d20551a0ae991c2079c75bc Mon Sep 17 00:00:00 2001 From: MRoyhanF Date: Fri, 8 Nov 2024 18:31:50 +0700 Subject: [PATCH] feat: yaml init --- .github/workflows/deploy..yml | 23 +++++++++++++++++++++++ app.yaml | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/deploy..yml create mode 100644 app.yaml diff --git a/.github/workflows/deploy..yml b/.github/workflows/deploy..yml new file mode 100644 index 0000000..ac005bf --- /dev/null +++ b/.github/workflows/deploy..yml @@ -0,0 +1,23 @@ +name: Deploy to GCP App Engine + +on: + push: + branches: ["main"] + +jobs: + deploy: + runs-on: ubuntu-latest + needs: test + + steps: + - uses: actions/checkout@v4 + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} + export_default_credentials: true + + - name: Deploy to Google App Engine + run: gcloud app deploy --quiet diff --git a/app.yaml b/app.yaml new file mode 100644 index 0000000..a050510 --- /dev/null +++ b/app.yaml @@ -0,0 +1,4 @@ +runtime: nodejs20 +instance_class: F1 +env_variables: + NODE_ENV: "production"