Skip to content

Commit 6d2b7cb

Browse files
authored
Merge pull request #4 from metakgp/upstream/transfer
fix workflow for deployment to gh-pages
2 parents 9cd0b52 + df62d4e commit 6d2b7cb

File tree

2 files changed

+55
-2
lines changed

2 files changed

+55
-2
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Integration Test (Build)
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22.2.0
23+
24+
- name: Install pnpm
25+
run: |
26+
npm install -g pnpm
27+
28+
- name: Cache pnpm store
29+
uses: actions/cache@v3
30+
with:
31+
path: ~/.pnpm-store
32+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
33+
restore-keys: |
34+
${{ runner.os }}-pnpm-store-
35+
36+
- name: Install dependencies
37+
if: steps.pnpm-cache.outputs.cache-hit != 'true'
38+
run: |
39+
pnpm install
40+
41+
- name: Build the application
42+
run: |
43+
pnpm run build
44+
45+
- name: Save build artifacts
46+
if: success()
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: build
50+
path: ./build

.github/workflows/deploy.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: Deploy to Github Pages
33
on:
44
push:
55
branches:
6-
- master
6+
- main
7+
pull_request:
8+
branches:
9+
- main
710

811
jobs:
912
build:
@@ -37,7 +40,7 @@ jobs:
3740
3841
- name: Download Artifacts
3942
id: download-artifact
40-
uses: dawidd6/action-download-artifact@v5
43+
uses: dawidd6/action-download-artifact@v8
4144
with:
4245
workflow: build-ci-test.yaml
4346
github_token: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)