Skip to content

Commit 95bea05

Browse files
authored
Fix deploy (#225)
* Fix deploy * Improve build and deployment report * Remove unused command
1 parent f8fc94c commit 95bea05

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/deploy-github-pages.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
push:
55
branches:
66
- master
7+
pull_request:
8+
branches:
9+
- master
710

811
permissions:
912
contents: read
1013
pages: write
1114
id-token: write
1215

1316
concurrency:
14-
group: "pages"
17+
group: 'pages'
1518
cancel-in-progress: false
1619

1720
jobs:
@@ -20,30 +23,31 @@ jobs:
2023
steps:
2124
- name: Checkout
2225
uses: actions/checkout@v4
23-
26+
2427
- name: Setup Node.js
2528
uses: actions/setup-node@v4
2629
with:
2730
node-version: '25.1.0'
2831
cache: 'npm'
29-
32+
3033
- name: Install dependencies
3134
run: npm ci
32-
35+
3336
- name: Build static site
34-
run: npm run export
37+
run: npm run build
3538
env:
3639
GITHUB_ACTIONS: true
3740
GITHUB_REPOSITORY: ${{ github.repository }}
3841
# Set CUSTOM_DOMAIN=true when using custom domain (e.g., opentechschool.org)
3942
CUSTOM_DOMAIN: true
40-
43+
4144
- name: Upload artifact
4245
uses: actions/upload-pages-artifact@v3
4346
with:
4447
path: ./out
4548

4649
deploy:
50+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
4751
environment:
4852
name: github-pages
4953
url: ${{ steps.deployment.outputs.page_url }}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"lint": "eslint --fix --ext .tsx,.js pages/**/** components/**/**",
88
"lint:watch": "nodemon --exec \"npm run lint || exit 1\" --ext ts,js",
99
"clean-cache": "rimraf -rf ./node_modules/.cache",
10-
"prod": "next start",
1110
"open": "sleepms 5000 && open http://localhost:3000",
1211
"dev": "npm run clean-cache && npm run lint && concurrently \"npm run lint:watch\" next \"npm run open\" --names \"🛂,🏗️,🖥️\" --prefix name ",
1312
"build": "npm run clean-cache && next build",

0 commit comments

Comments
 (0)