Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b8b4478
t
RamiAsad1 Jul 11, 2026
a366b19
e
RamiAsad1 Jul 11, 2026
f6c86cc
test
RamiAsad1 Jul 11, 2026
bfb9456
test fixed
RamiAsad1 Jul 11, 2026
9b8927d
ci: add install and test steps with updated lockfile
RamiAsad1 Jul 11, 2026
7b087e9
fix: generate cross-platform lockfile entries
RamiAsad1 Jul 11, 2026
543c540
ci: switch to npm install for cross-platform compliance
RamiAsad1 Jul 11, 2026
a3c6be8
ci: restore npm ci with linux target included
RamiAsad1 Jul 11, 2026
43cc6d3
chore: complete reset and regeneration of lockfile
RamiAsad1 Jul 11, 2026
f6dd353
ci: omit optional platform dependencies in npm ci
RamiAsad1 Jul 11, 2026
f64cbee
ci: omit optional platform dependencies in npm ci
RamiAsad1 Jul 11, 2026
fe8e7f1
ci: omit optional platform dependencies in npm ci
RamiAsad1 Jul 11, 2026
520a55b
ci: omit optional platform dependencies in npm ci
RamiAsad1 Jul 11, 2026
15263d6
ci: fix yaml syntax and indentation
RamiAsad1 Jul 11, 2026
5027f46
added coverage
RamiAsad1 Jul 11, 2026
d14a7ba
Update README.md
RamiAsad1 Jul 11, 2026
0497f44
s
RamiAsad1 Jul 11, 2026
047d6ba
s
RamiAsad1 Jul 11, 2026
d8614c7
added linting
RamiAsad1 Jul 11, 2026
3dd4a1b
fixed error
RamiAsad1 Jul 11, 2026
a14eee8
ci: strict linting check with zero warning tolerance
RamiAsad1 Jul 12, 2026
bd3ed12
fixed warning
RamiAsad1 Jul 12, 2026
42f4e71
fixed warning
RamiAsad1 Jul 12, 2026
63ae01c
cd: init
RamiAsad1 Jul 12, 2026
a10928d
integrate gcloud authentication and artifact registry deployment
RamiAsad1 Jul 13, 2026
9b44a36
added action to deploy
RamiAsad1 Jul 14, 2026
4dbe21f
fixed cd.yml
RamiAsad1 Jul 14, 2026
0ce929d
added migraion to actions
RamiAsad1 Jul 14, 2026
ac8e482
fixed push error
RamiAsad1 Jul 14, 2026
99a4f1e
ci: map db:migrate script and update cd workflow string matching
RamiAsad1 Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: cd

on:
push:
branches: [main]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm ci
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true

- name: Build application
run: npm run build

- name: Run migrations
run: npm run db:migrate

- name: Set up Google Cloud SDK
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- name: Set up gcloud CLI
uses: google-github-actions/setup-gcloud@v2

- name: Build and Push Docker Image
run: gcloud builds submit --tag us-central1-docker.pkg.dev/notely-502210/notely-ar-repo/notely:latest .

- name: Deploy to Cloud Run
run: gcloud run deploy notely --image us-central1-docker.pkg.dev/notely-502210/notely-ar-repo/notely:latest --region us-central1 --allow-unauthenticated --project notely-502210 --max-instances=4
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ci

on:
pull_request:
branches: [main]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm ci
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true

- name: Run tests
run: npm run test

style:
name: Style
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install dependencies
run: npm ci
env:
NPM_CONFIG_LEGACY_PEER_DEPS: true

- name: Run formatting check
run: npm run format:check

- name: Check linting
run: npm run lint -- --max-warnings=0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /usr/src/app

ADD . .

RUN npm ci
RUN NPM_CONFIG_LEGACY_PEER_DEPS=true npm ci

RUN npm run build

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).

![CI Status](https://github.com/RamiAsad1/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)

## Local Development

Make sure you're on Node version 22+.
Expand Down
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import { defineConfig } from "eslint/config";
import pluginSecurity from "eslint-plugin-security";

export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: { globals: globals.node },
},
tseslint.configs.recommended,
pluginSecurity.configs.recommended,
]);
Loading