Skip to content

Deploy Docs

Deploy Docs #29

Workflow file for this run

# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Docs
on: workflow_dispatch
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: "true"
fetch-depth: 0
- name: Detect package manager
id: detect-package-manager
run: |
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: ./docs
- name: Install dependencies
run: cd ./docs && ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: cd ./docs && ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Add .nojekyll file
run: touch ./docs/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./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@v2