diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 30a4384..63340cd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -4,12 +4,14 @@ name: Compile TCGdex on: + # Run on Webhook + repository_dispatch: + # Run when a push is made on master push: branches: - master + # Run on any pull request pull_request: - workflow_dispatch: - repository_dispatch: jobs: build: @@ -49,6 +51,7 @@ jobs: - name: Commit Changes working-directory: ./dist if: ${{ (github.event_name == 'push') || github.event_name == 'repository_dispatch' }} + continue-on-error: true run: | git config --local user.email "bot@tcgdex.net" git config --local user.name "TCGdex [bot]" @@ -57,7 +60,7 @@ jobs: - name: Push changes uses: ad-m/github-push-action@master - if: ${{ (github.event_name == 'push') || github.event_name == 'repository_dispatch' }} + if: ${{ success() && (github.event_name == 'push' || github.event_name == 'repository_dispatch') }} with: github_token: ${{ secrets.PUSH_TOKEN }} directory: ./dist @@ -65,7 +68,7 @@ jobs: - name: Upload run: yarn upload - if: ${{ (github.event_name == 'push') || github.event_name == 'repository_dispatch' }} + if: ${{ success() && (github.event_name == 'push' || github.event_name == 'repository_dispatch') }} env: UPLOAD_REMOTE: ${{ secrets.UPLOAD_REMOTE }} UPLOAD_DIST: ${{ secrets.UPLOAD_DIST }}