Test workflow #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Commit Dist Files On Merge | |
on: | |
pull_request: | |
types: [synchronize, opened, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22' | |
- name: Pull latest changes from the remote | |
run: git pull origin ${GITHUB_REF#refs/heads/} | |
- name: Install dependencies | |
run: yarn install | |
- name: Build project | |
run: yarn build | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add dist | |
git commit -m "rebuild" | |
git push origin HEAD:${{ github.event.pull_request.head.ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |