Skip to content

Commit

Permalink
chore: update next config
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed Jan 17, 2024
1 parent eaa6a0a commit 0861b0c
Show file tree
Hide file tree
Showing 8 changed files with 9,864 additions and 4 deletions.
43 changes: 42 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
name: Pages on: push: branches: ["main"] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: "pages" cancel-in-progress: false jobs: # Build job build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - run: npm ci - run: npm run build -w @service-lens/docs env: BASE_PATH: /service-lens - uses: actions/upload-pages-artifact@v3 with: path: ./packages/docs/dist deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4
name: Pages

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npm run build -w @service-lens/docs
env:
BASE_PATH: /service-lens
- uses: actions/upload-pages-artifact@v3
with:
path: ./packages/docs/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Docs Template

A teeny tiny template to start a documentation.

It defaults to deploy to [GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)

## License

[MIT](/LICENSE)

Happy coding!
14 changes: 14 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type {import('next').NextConfig} */
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './src/theme.config.tsx'
})

module.exports = withNextra({
output: 'export',
distDir: 'dist',
basePath: process.env.BASE_PATH ?? '',
images: {
unoptimized: true
}
})
Loading

0 comments on commit 0861b0c

Please sign in to comment.