Skip to content

Commit 9de5d2d

Browse files
committed
feat: add workflow
1 parent 03e4ce2 commit 9de5d2d

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
jobs:
11+
build-and-deploy:
12+
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
13+
runs-on: ubuntu-latest
14+
env:
15+
NEXTJS_ASSET_PREFIX: /jsontree
16+
steps:
17+
- name: Checkout 🛎️
18+
uses: actions/checkout@v4
19+
20+
- uses: pnpm/action-setup@v4
21+
name: Install pnpm
22+
with:
23+
version: 10
24+
run_install: false
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
cache: "pnpm"
31+
32+
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
33+
run: |
34+
pnpm i
35+
pnpm run build
36+
37+
- name: Deploy 🚀
38+
uses: JamesIves/github-pages-deploy-action@v4
39+
with:
40+
folder: out # The folder the action should deploy.

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const nextConfig = {
33
output: "export",
44
reactStrictMode: true,
5+
assetPrefix: process.env.NEXTJS_ASSET_PREFIX || "",
56
};
67

78
module.exports = nextConfig;

public/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)