added next config to build #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: push | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: build-docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
- run: git clone https://github.com/shuding/nextra-docs-template | |
- run: npm i --prefix ./nextra-docs-template | |
- run: "echo 'Bun.write(`./nextra-docs-template/next.config.js`, `const withNextra = require(\"nextra\")({ theme: \"nextra-theme-docs\", themeConfig: \"./theme.config.tsx\" }); module.exports = withNextra({ distDir: \"./build\" })`)' | bun run -" | |
- run: npm run --prefix ./nextra-docs-template build | |
- uses: actions/configure-pages@v4 | |
with: | |
static_site_generator: next | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
name: my-artifact | |
path: ./nextra-docs-template/build | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Publish to GitHub Pages 🚀 | |
id: deployment | |
uses: actions/deploy-pages@v4 | |