Skip to content

Test workflow

Test workflow #26

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: 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 }} --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}