Deployment
Since SuperDocs generates a static site, you can deploy it to any static hosting provider.
Building for Production
To create a production build, run:
npx superdocs build -i ./my-docsThis will generate a dist folder containing your static HTML, CSS, and JS files.
Vercel
- Push your code to a Git repository.
- Import the project into Vercel.
- Set the Build Command to:
npx superdocs build -i ./docs(adjust./docsto your folder). - Set the Output Directory to:
dist. - Deploy!
Netlify
- Push your code to a Git repository.
- New site from Git.
- Build command:
npx superdocs build -i ./docs. - Publish directory:
dist. - Deploy site.
GitHub Pages
You can use a GitHub Action to build and deploy.
name: Deploy Docson: push: branches: [main]
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 18 - run: npx superdocs build -i ./docs - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./dist