merge.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Runs whenever a PR is merged:
  2. # - attempt to backports fixes
  3. # - upload nightly docs
  4. #
  5. # Future:
  6. # - upload nightly CLI builds
  7. # - upload nightly vscode extension
  8. # - upload benchmarks
  9. # - compute coverge
  10. #
  11. # Note that direct commits to master circumvent this workflow!
  12. name: Backport merged pull request
  13. on:
  14. pull_request_target:
  15. types: [closed]
  16. permissions:
  17. contents: write # so it can comment
  18. pull-requests: write # so it can create pull requests
  19. jobs:
  20. # Attempt to backport a merged pull request to the latest stable release
  21. backport:
  22. name: Backport pull request
  23. runs-on: ubuntu-latest
  24. # Don't run on closed unmerged pull requests, or pull requests with the "breaking" label
  25. if: github.event.pull_request.merged && !contains(github.event.pull_request.labels.*.name, 'breaking')
  26. steps:
  27. - uses: actions/checkout@v4
  28. - name: Create backport pull requests
  29. uses: korthout/backport-action@v3
  30. # Upload nightly docs to the website
  31. docs:
  32. runs-on: ubuntu-latest
  33. permissions:
  34. contents: write
  35. steps:
  36. - uses: actions/checkout@v4
  37. - run: sudo apt-get update
  38. - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
  39. - uses: dtolnay/rust-toolchain@nightly
  40. with:
  41. toolchain: nightly-2024-02-01
  42. - uses: Swatinem/rust-cache@v2
  43. with:
  44. cache-all-crates: "true"
  45. save-if: ${{ github.ref == 'refs/heads/main' }}
  46. - name: cargo doc
  47. run: cargo doc --no-deps --workspace --all-features
  48. - name: Deploy
  49. uses: JamesIves/github-pages-deploy-action@v4.7.3
  50. with:
  51. branch: gh-pages
  52. folder: target/doc
  53. target-folder: api-docs/nightly
  54. repository-name: dioxuslabs/docsite
  55. clean: false
  56. token: ${{ secrets.DEPLOY_KEY }}
  57. # Attempt to backport a merged pull request to the latest stable release
  58. #
  59. # If the backported PR is succesfully merged
  60. # Any PR without the "breaking" label will be attempted to be backported to the latest stable release
  61. # Coverage is disabled until we can fix it
  62. # coverage:
  63. # name: Coverage
  64. # runs-on: ubuntu-latest
  65. # container:
  66. # image: xd009642/tarpaulin:develop-nightly
  67. # options: --security-opt seccomp=unconfined
  68. # steps:
  69. # - name: Checkout repository
  70. # uses: actions/checkout@v4
  71. # - name: Generate code coverage
  72. # run: |
  73. # apt-get update &&\
  74. # apt-get install build-essential &&\
  75. # apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev -y &&\
  76. # cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
  77. # - name: Upload to codecov.io
  78. # uses: codecov/codecov-action@v2
  79. # with:
  80. # fail_ci_if_error: false