diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index cef501e..5d0d17a 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -1,4 +1,4 @@ -name: 📜 Check & deploy API documentation +name: 📜 Deploy API documentation permissions: contents: read @@ -11,12 +11,6 @@ on: paths: - 'docs/api-docs.yaml' - '.github/workflows/bump.yml' - pull_request: - branches: - - main - paths: - - 'docs/api-docs.yaml' - - '.github/workflows/bump.yml' jobs: deploy-doc: @@ -33,23 +27,3 @@ jobs: hub: jqshuv token: ${{ secrets.BUMPSH_SECRET }} file: docs/api-docs.yaml - - api-diff: - if: ${{ github.event_name == 'pull_request' }} - name: 🤖 Check API diff - runs-on: ubuntu-latest - steps: - - name: ⬇️ Checkout - uses: actions/checkout@v3 - - name: 🖊️ Comment pull request with API diff - uses: bump-sh/github-action@v1 - with: - doc: short - hub: jqshuv - token: ${{ secrets.BUMPSH_SECRET }} - file: docs/api-docs.yaml - command: diff - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - diff --git a/.github/workflows/bumppr.yml b/.github/workflows/bumppr.yml new file mode 100644 index 0000000..12aefae --- /dev/null +++ b/.github/workflows/bumppr.yml @@ -0,0 +1,34 @@ +name: 🖊️ Check diff API documentation + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + branches: + - main + paths: + - 'docs/api-docs.yaml' + - '.github/workflows/bump.yml' + +jobs: + api-diff: + if: ${{ github.event_name == 'pull_request' }} + name: 🤖 Check API diff + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout + uses: actions/checkout@v3 + - name: 🖊️ Comment pull request with API diff + uses: bump-sh/github-action@v1 + with: + doc: short + hub: jqshuv + token: ${{ secrets.BUMPSH_SECRET }} + file: docs/api-docs.yaml + command: diff + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + +