-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #847 from watermark-design/dev
ci: add pr-build.yml
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: PR Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Install PNPM | ||
run: npm i pnpm@latest -g | ||
|
||
- name: Setup npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | ||
|
||
- name: setup pnpm config | ||
run: pnpm config set store-dir $PNPM_CACHE_FOLDER | ||
|
||
- name: Install Package | ||
run: pnpm install | ||
|
||
- name: Build Package | ||
run: pnpm run build | ||
|
||
- name: Build Docs Package | ||
run: pnpm run docs:build |