update-docs.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: update-docs
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. gitName:
  6. description: 'git name for PR'
  7. required: false
  8. default: 'tauri-bot'
  9. gitEmail:
  10. description: 'git email for PR'
  11. required: false
  12. default: 'tauri-bot@tauri.studio'
  13. jobs:
  14. update-docs:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: checkout tauri
  18. uses: actions/checkout@v2
  19. with:
  20. path: tauri
  21. - name: checkout tauri-docs
  22. uses: actions/checkout@v2
  23. with:
  24. repository: tauri-apps/tauri-docs
  25. path: tauri-docs
  26. - name: install webkit2gtk
  27. run: |
  28. sudo apt-get update
  29. sudo apt-get install -y webkit2gtk-4.0
  30. - name: generate rust docs
  31. working-directory: tauri
  32. run: cargo doc --no-deps
  33. - name: run rustdocusaurus
  34. uses: tauri-apps/rustdocusaurus/github-action@v1
  35. with:
  36. originPath: ./tauri/target/doc/
  37. targetPath: ./tauri-docs/docs/en/api/rust/
  38. sidebarPath: ./tauri-docs/sidebars.json
  39. linksRoot: /docs/api/rust/
  40. cratesToProcess: "tauri,tauri_api,tauri_utils"
  41. - name: git config
  42. run: |
  43. git config --global user.name "${{ github.event.inputs.gitName }}"
  44. git config --global user.email "${{ github.event.inputs.gitEmail }}"
  45. - name: create pull request for updated docs
  46. uses: tauri-apps/create-pull-request@v2.8.0
  47. with:
  48. token: ${{ secrets.TAURI_BOT_PAT }}
  49. commit-message: "chore(docs): Update Rust docs"
  50. branch: docs/release
  51. path: tauri-docs
  52. title: Update Docs
  53. labels: "new release"
  54. body: |
  55. These are the updated docs from the most recent release.