diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml new file mode 100644 index 000000000..8a7c0bae6 --- /dev/null +++ b/.github/workflows/gh_pages.yml @@ -0,0 +1,24 @@ +name: Deploy documentation to GH Pages + +on: + pull_request: + merge_group: + workflow_dispatch: + push: + branches: [main] + +jobs: + deploy-docs: + if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Build docs + run: nix build .#hax.docs --out-link ./built-docs + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./built-docs