Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c1746c2
Update README.md
huyhhuy1410 Jul 23, 2026
be72dbb
Revert "Update README.md"
huyhhuy1410 Jul 23, 2026
cba5726
Update README.md
huyhhuy1410 Jul 23, 2026
eb1964e
Update README with name
huyhhuy1410 Jul 23, 2026
612eb3c
Add initial failing CI workflows
huyhhuy1410 Jul 23, 2026
06e37bd
Merge branch 'main' into addtests
huyhhuy1410 Jul 23, 2026
b88286b
update CI workflows
huyhhuy1410 Jul 23, 2026
9b813d5
update CI workflows
huyhhuy1410 Jul 23, 2026
be03a09
update ci workflows v2
huyhhuy1410 Jul 23, 2026
1e07dfb
create initial test
huyhhuy1410 Jul 23, 2026
17ee9e2
Merge branch 'main' into addtests
huyhhuy1410 Jul 23, 2026
5320b04
fix: regenerate package-lock.json for CI
huyhhuy1410 Jul 23, 2026
158a99f
rm package-json.lock
huyhhuy1410 Jul 23, 2026
a06a370
Add package-json.lock
huyhhuy1410 Jul 23, 2026
9f0f031
Update package-lock.json
huyhhuy1410 Jul 23, 2026
ec7ca65
chore: install dependencies
huyhhuy1410 Jul 23, 2026
a025117
update ci
huyhhuy1410 Jul 23, 2026
409a0bc
add code coverage
huyhhuy1410 Jul 23, 2026
c51f7dd
add test badge
huyhhuy1410 Jul 24, 2026
54e725f
add style CI
huyhhuy1410 Jul 24, 2026
c62e971
update style CI
huyhhuy1410 Jul 24, 2026
90dc873
update style CI
huyhhuy1410 Jul 24, 2026
f0b782e
fix package-lock.json platform dependencies
huyhhuy1410 Jul 24, 2026
b1eb3a0
add lint ci
huyhhuy1410 Jul 24, 2026
991ce97
hotfix
huyhhuy1410 Jul 24, 2026
86ab613
hotfix
huyhhuy1410 Jul 24, 2026
61d8e9b
hotfix
huyhhuy1410 Jul 24, 2026
def97d0
hotfix
huyhhuy1410 Jul 24, 2026
c870576
add cd
huyhhuy1410 Jul 24, 2026
5ff8b83
update gcp
huyhhuy1410 Jul 26, 2026
63cdaf4
update gcp
huyhhuy1410 Jul 26, 2026
e0fd480
update index.html
huyhhuy1410 Jul 26, 2026
f873f70
hotfix cd
huyhhuy1410 Jul 26, 2026
89260a5
add migrate step
huyhhuy1410 Jul 26, 2026
9168ff5
add migrate step
huyhhuy1410 Jul 26, 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
46 changes: 46 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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@v5

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

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

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

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v3

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

- name: migrate db
run: npm run db:migrate

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

on:
pull_request:
branches: [main]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm ci

- name: Run test
run: npm run test -- --coverage

style:
name: Style
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm ci

- name: Run formatting check
run: npm run format:check
- name: Run linting check
run: npm run lint -- --max-warnings=0
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![ci](https://github.com/huyhhuy1410/learn-cicd-typescript-starter/actions/workflows/ci.yml/badge.svg)](https://github.com/huyhhuy1410/learn-cicd-typescript-starter/actions/workflows/ci.yml)
# learn-cicd-typescript-starter (Notely)

This repo contains the typescript starter code for the "Notely" application for the "Learn CICD" course on [Boot.dev](https://boot.dev).
Expand All @@ -22,3 +23,4 @@ npm run dev
_This starts the server in non-database mode._ It will serve a simple webpage at `http://localhost:8080`.

You do _not_ need to set up a database or any interactivity on the webpage yet. Instructions for that will come later in the course!
huyhhuy1410's version of Boot.dev's Notely app.
10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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"], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended, pluginSecurity.configs.recommended,
]);
Empty file added package-json.lock
Empty file.
Loading