diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000..c387582a --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,35 @@ +name: build docs + +on: + push: + paths: + - 'docs/**/*' + branches: + - docusaurus + +jobs: + deploy: + name: Build Docusaurus to gh-pages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: npm + cache-dependency-path: docs/package-lock.json + + - name: Install dependencies + working-directory: ./docs/ + run: cdnpm ci + - name: Build website + working-directory: ./docs/ + run: npm run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index b8b1386d..79f8bc71 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -17,6 +17,7 @@ const config: Config = { // If you aren't using GitHub pages, you don't need these. organizationName: 'jcubic', // Usually your GitHub org/user name. projectName: 'lips', // Usually your repo name. + deploymentBranch: 'docusaurus', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn',