diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 0d3ba36..3b4c7dc 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,7 +6,30 @@ on: - main jobs: + detect-changes: + runs-on: ubuntu-latest + outputs: + bot: ${{ steps.filter.outputs.bot }} + api: ${{ steps.filter.outputs.api }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check for changes + uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + bot: + - 'apps/bot/**' + - 'packages/**' + api: + - 'apps/api/**' + - 'packages/**' + build-and-deploy-bot: + needs: detect-changes + if: needs.detect-changes.outputs.bot == 'true' env: DOCKER_LATEST: latest runs-on: ubuntu-latest @@ -54,6 +77,8 @@ jobs: }' build-and-deploy-api: + needs: detect-changes + if: needs.detect-changes.outputs.api == 'true' env: DOCKER_LATEST: latest runs-on: ubuntu-latest