Skip to content

Commit

Permalink
Refactor workflows to exclude specific paths from triggering CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
jqshuv committed Oct 15, 2024
1 parent d77841f commit ff7ff5d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 27 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 📜 Check & deploy API documentation
name: 📜 Deploy API documentation

permissions:
contents: read
Expand All @@ -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:
Expand All @@ -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}}


34 changes: 34 additions & 0 deletions .github/workflows/bumppr.yml
Original file line number Diff line number Diff line change
@@ -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}}


0 comments on commit ff7ff5d

Please sign in to comment.