Skip to content

Commit

Permalink
chore: deploy gh pages with gh action (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
toomuchdesign authored Jul 5, 2024
1 parent 558149e commit 9b34fe6
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 596 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to GH pages

on:
push:
branches:
- master

permissions:
contents: write

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- run: npm ci
- run: npm run demo:build

- name: Deploy GH pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: demo/out
8 changes: 4 additions & 4 deletions demo/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ if (process.env.BUILD_TARGET === 'github-pages') {
basePath = `/${repo}`;
}


const nextConfig = {
output: 'export',
assetPrefix: assetPrefix,
basePath: basePath
}
basePath: basePath,
};

export default nextConfig
export default nextConfig;
Loading

0 comments on commit 9b34fe6

Please sign in to comment.