Skip to content

Commit

Permalink
please
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwardius committed May 30, 2024
1 parent 206d301 commit e2852b4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 50 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Use Node.js 21
- name: Use Node.js 22
uses: actions/setup-node@v3
with:
node-version: '21'

- name: Install dependencies
run: npm install
node-version: '22'

- name: Run export
run: npm run export
run: |
npm install
npm run export

- name: Deploy to GitHub Pages
if: success()
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
- name: Set up Node.js 22
uses: actions/setup-node@v3
with:
node-version: '21' # Specify the version of Node.js you need

- name: Install dependencies
run: npm install
node-version: '22' # Specify the version of Node.js you need

- name: Run export
run: npm run export
run: |
npm install
npm run export

- name: Deploy to GitHub Pages Preview
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
Expand Down
43 changes: 7 additions & 36 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,11 @@
// Original Next.js config
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});

module.exports = {
reactStrictMode: true,
output: 'export',
...withNextra(),
images: {
// output: export doesn't support Next.js image optimization
unoptimized: true,
},
// Next.js doesn't support trailing slashes in basePath
// This config needs to be in sync with export-images.config.js
basePath: (process.env.WEBSITE_BASE_PATH || '').replace(/\/$/, ""),
webpack: (config) => {
// Add Typescript support
// Reference: https://www.altogic.com/blog/nextjs-typescript
config.resolve.extensions.push(".ts", ".tsx");
return config;
},
eslint: {
dirs: [
'pages',
'src',
'app',
'components',
'lib',
'theme.config.jsx',
"tailwind.config.js",
"next.config.js",
"postcss.config.js",
]
}
}

// Add Nextra config
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
latex: true, // LaTeX support: https://nextra.site/docs/guide/advanced/latex
});

module.exports = withNextra(module.exports)
};

0 comments on commit e2852b4

Please sign in to comment.