update docs #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push API Docs | |
on: | |
push: | |
branches: [ stable ] | |
paths: | |
- 'src/**/*.zig' | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.13.0 | |
- name: Build API Documentation | |
run: zig build docs | |
- name: Push to docs repository | |
run: | | |
cd zig-out/docs | |
git init | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Update API documentation" | |
git push --force https://x-access-token:${{ secrets.API_DOCS_PAT }}@github.com/chrischtel/zfitsio.github.io.git HEAD:api-docs |