Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbuilds authored Jul 24, 2024
1 parent a9eb505 commit f3067be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ name: Build Plugin
on:
push:
branches:
- main
- master
pull_request:
branches:
- main

permissions:
contents: write
- master

jobs:
build:
Expand All @@ -19,6 +16,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Use Node.js
uses: actions/setup-node@v3
Expand Down Expand Up @@ -50,7 +48,7 @@ jobs:
- name: Build
run: pnpm build

- name: Commit and push if changed
- name: Commit, fetch, rebase, and push if changed
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
Expand All @@ -60,5 +58,7 @@ jobs:
echo "No changes to commit"
else
git commit -m "Automated build"
git push
git fetch origin ${{ github.ref }}
git rebase origin/${{ github.ref }}
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}
fi

0 comments on commit f3067be

Please sign in to comment.