Skip to content

Commit

Permalink
New workflow to build artifact on PR for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
yeoji committed Feb 7, 2024
1 parent 8436989 commit caa39c2
Show file tree
Hide file tree
Showing 5 changed files with 879 additions and 822 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
uses: actions/checkout@v4

- name: Set Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Setup Yarn 🧶
run: |
corepack enable
yarn set version stable
- name: Install and Build 🔧
run: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Artifact on PR
on:
pull_request:
types:
- opened
- synchronize
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Set Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Setup Yarn 🧶
run: |
corepack enable
yarn set version stable
- name: Install and Build 🔧
run: |
yarn install
yarn build
- name: Upload artifacts 📦
uses: actions/upload-artifact@v4
with:
name: gh-pages
path: dist
retention-days: 5
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ node_modules
dist
.cache
.DS_Store
.yarn

.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules
Loading

0 comments on commit caa39c2

Please sign in to comment.