Skip to content

Commit

Permalink
Merge pull request #1 from KjellBerlin/Introduce-github-actions-deplo…
Browse files Browse the repository at this point in the history
…yment

Github actions deployment
  • Loading branch information
KjellBerlin authored Sep 19, 2024
2 parents b559dd7 + 59d189d commit d2bd3b9
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy Prod

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build React app
run: npm run build

- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}'

- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}

- name: Deploy to App Engine
run: |
gcloud app deploy --quiet

0 comments on commit d2bd3b9

Please sign in to comment.