Skip to content

Commit 4729657

Browse files
committed
ci: update to consider sub directory
1 parent ed2bdba commit 4729657

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
# Runs on pushes targeting the default branch
66
push:
77
branches: ['main']
8+
paths:
9+
- '2025/**'
810

911
# Allows you to run this workflow manually from the Actions tab
1012
workflow_dispatch:
@@ -21,33 +23,37 @@ concurrency:
2123
cancel-in-progress: true
2224

2325
jobs:
24-
# Single deploy job since we're just deploying
25-
deploy:
26+
build-and-deploy:
27+
runs-on: ubuntu-latest
2628
environment:
2729
name: github-pages
2830
url: ${{ steps.deployment.outputs.page_url }}
29-
runs-on: ubuntu-latest
3031
steps:
3132
- name: Checkout
3233
uses: actions/checkout@v5
34+
3335
- name: Set up Node
3436
uses: actions/setup-node@v5
3537
with:
3638
node-version: lts/*
3739
cache: 'npm'
38-
- name: Enter directory
39-
run: cd 2025
40+
cache-dependency-path: 2025/package-lock.json
41+
4042
- name: Install dependencies
41-
run: npm ci
43+
run: cd 2025 && npm ci
44+
4245
- name: Build
43-
run: npm run build
46+
run: cd 2025 && npm run build
47+
4448
- name: Setup Pages
4549
uses: actions/configure-pages@v5
50+
4651
- name: Upload artifact
4752
uses: actions/upload-pages-artifact@v4
4853
with:
4954
# Upload dist folder
50-
path: './dist'
55+
path: '2025/dist'
56+
5157
- name: Deploy to GitHub Pages
5258
id: deployment
5359
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)