api-docs.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Build and publish v1 API docs
  2. on:
  3. push:
  4. branches: [v1_release]
  5. paths:
  6. - docfx/**
  7. jobs:
  8. deploy:
  9. name: Build and Deploy v1 API docs to github-pages
  10. environment:
  11. name: github-pages
  12. url: ${{ steps.deployment.outputs.page_url }}
  13. runs-on: windows-latest
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v4
  17. - name: DocFX Build
  18. working-directory: docfx
  19. run: |
  20. dotnet tool install -g docfx
  21. $env:DOCFX_SOURCE_BRANCH_NAME="${{ github.ref_name }}"
  22. docfx metadata
  23. docfx build
  24. continue-on-error: false
  25. - name: Setup Pages
  26. uses: actions/configure-pages@v5
  27. - name: Upload artifact
  28. uses: actions/upload-pages-artifact@v2
  29. with:
  30. path: docfx/_site
  31. - name: Terminal.GuiV1Docs Repository Dispatch ${{ github.ref_name }}
  32. if: github.ref_name == 'v1_release'
  33. uses: peter-evans/repository-dispatch@v3
  34. with:
  35. token: ${{ secrets.V2DOCS_TOKEN }}
  36. repository: gui-cs/Terminal.GuiV1Docs
  37. event-type: v1_release_push
  38. client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'