Skip to content

automate the build

automate the build #2

Workflow file for this run

name: Continuous Deployment
on:
push:
branches: [main]
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Authenticate to GCP
uses: google-github-actions/setup-gcloud@v3
with:
project_id: notely-477105
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
- name: Verify gcloud
run: gcloud info
- name: Build and push image to Artifact Registry
run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-477105/notely-repo/notely-app:latest .