name: Build and deploy docs on: push: branches: [main] paths: - "api/**" - "shared/**" - "mod.ts" - "deno.json" - "deno.lock" - ".gitea/workflows/docs.yaml" workflow_dispatch: env: # Same Deno as the Docker image (Dockerfile). DENO_VERSION: "2.9.0" jobs: build-and-push: runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@v4 - uses: denoland/setup-deno@v2 with: deno-version: ${{ env.DENO_VERSION }} - name: Build docs # `deno doc` writes relative links, so the site works under whatever # path the gitea-pages proxy serves it from # (https://pub.sqrt.fr///). run: deno task doc - name: Deploy docs uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} force_orphan: true publish_branch: gh-pages publish_dir: ./docs