Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lerte committed Apr 6, 2024
1 parent 57c7018 commit 28647bc
Show file tree
Hide file tree
Showing 4 changed files with 284 additions and 375 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy
on:
push:
branches: [main]

jobs:
github_pages_deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
pnpm export
- name: Deploy
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 16 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
})
/** @type {import('next').NextConfig} */
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});

module.exports = withNextra()
const nextConfig = {
images: {
unoptimized: true,
},
output: "export",
};

module.exports = {
...withNextra(),
...nextConfig,
};
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
"start": "next start",
"export": "next build && touch out/.nojekyll",
"deploy": "gh-pages -d out -t true"
},
"repository": {
"type": "git",
Expand All @@ -18,13 +20,13 @@
"next": "^13.5.6",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"qiniu": "^7.11.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "18.11.10",
"autoprefixer": "^10.4.19",
"gh-pages": "^6.1.1",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.1",
"typescript": "^4.9.3"
Expand Down
Loading

0 comments on commit 28647bc

Please sign in to comment.