Skip to content

Test workflow

Test workflow #31

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.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git add dist
git commit --amend -m "${{ github.event.head_commit.message }} [skip ci]"
git push origin HEAD:${{ github.event.pull_request.head.ref }} --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}