Skip to content

Commit

Permalink
feat(ci/cd): allow direct push to trigger workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aimixsaka authored Sep 28, 2023
1 parent 95c80cb commit eba5835
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/update_posts.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: UpdateDocs

on:
push:
branches:
- main
repository_dispatch:
types: [update_docs]


jobs:
build:
Expand Down Expand Up @@ -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

0 comments on commit eba5835

Please sign in to comment.