docs.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Deploy Docs
  2. on:
  3. push:
  4. branches:
  5. - main
  6. permissions:
  7. contents: read
  8. jobs:
  9. deploy:
  10. runs-on: ubuntu-latest
  11. permissions:
  12. contents: write #needed to publish documentation
  13. steps:
  14. - uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
  15. with:
  16. egress-policy: audit
  17. - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
  18. with:
  19. fetch-depth: 0
  20. - name: Setup Go
  21. uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
  22. with:
  23. go-version-file: "go.mod"
  24. - name: Configure Git
  25. env:
  26. TOKEN: ${{ secrets.GITHUB_TOKEN }}
  27. run: |
  28. git config user.name "$GITHUB_ACTOR"
  29. git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
  30. git remote set-url origin "https://x-access-token:${{ env.TOKEN }}@github.com/${{ github.repository }}.git"
  31. - name: Build Docs
  32. run: make docs.publish
  33. env:
  34. GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"