From eba5835a7b10717c3ef894a7e8c97def94bdf7f0 Mon Sep 17 00:00:00 2001 From: "A.S.K" <95036645+aimixsaka@users.noreply.github.com> Date: Thu, 28 Sep 2023 14:48:05 +0800 Subject: [PATCH] feat(ci/cd): allow direct push to trigger workflow --- .github/workflows/update_posts.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/update_posts.yml b/.github/workflows/update_posts.yml index b3d2e23..e610e72 100644 --- a/.github/workflows/update_posts.yml +++ b/.github/workflows/update_posts.yml @@ -1,8 +1,12 @@ name: UpdateDocs on: + push: + branches: + - main repository_dispatch: types: [update_docs] + jobs: build: @@ -35,20 +39,3 @@ jobs: remote_key: ${{ secrets.DEPLOY_KEY }} - - - name: commit changes - run: | - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - if $(git diff | grep -q ""); then - git add . - git commit -m "update docs source" - fi - - - name: push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.PAT }} - force: true - branch: main -