Skip to content

Commit

Permalink
refactor: CI & CD (#636)
Browse files Browse the repository at this point in the history
* Update package manager to pnpm

* Update pnpm version to "latest" in build and release workflows
  • Loading branch information
YeungKC authored Dec 7, 2023
1 parent e61ea12 commit f00c1ee
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build test

on:
push:

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

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: "latest"

- name: Install dependencies
run: pnpm i

- name: Install dependencies for SSG
working-directory: ssg/
run: pnpm i

- name: Build SPA
working-directory: .
run: pnpm run build

- name: Build SSG
working-directory: ssg/
run: pnpm run build
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ jobs:
with:
node-version: "lts/*"

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: "latest"

- name: Install dependencies
run: npm i
run: pnpm i

- name: Install dependencies for SSG
working-directory: ssg/
run: npm i
run: pnpm i

- name: Build SPA
working-directory: .
run: npm run build
run: pnpm run build

- name: Build SSG
working-directory: ssg/
run: npm run build
run: pnpm run build

- name: Create release directory
run: mkdir release
Expand Down

0 comments on commit f00c1ee

Please sign in to comment.