api-docs.yml 985 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Build and publish v2 API docs
  2. on:
  3. push:
  4. branches: [v2_develop]
  5. permissions:
  6. id-token: write
  7. pages: write
  8. jobs:
  9. deploy:
  10. name: Build and Deploy v2 API docs to github-pages ${{ github.ref_name }}
  11. environment:
  12. name: github-pages
  13. url: ${{ steps.deployment.outputs.page_url }}
  14. runs-on: windows-latest
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v4
  18. - name: DocFX Build
  19. working-directory: docfx
  20. run: |
  21. dotnet tool install -g docfx
  22. $env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}"
  23. docfx metadata
  24. docfx build
  25. continue-on-error: false
  26. - name: Setup Pages
  27. uses: actions/configure-pages@v5
  28. - name: Upload artifact
  29. uses: actions/upload-pages-artifact@v3
  30. with:
  31. path: docfx/_site
  32. - name: Deploy to GitHub Pages
  33. id: deployment
  34. uses: actions/deploy-pages@v4
  35. with:
  36. token: ${{ secrets.GITHUB_TOKEN }}