Test CI #6
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 assets | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
build-and-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Fetches all history for .Git commits and tags | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci --force | |
- name: Build assets | |
run: npm run build | |
- name: Commit changes | |
run: | | |
git config --global user.name '${{ github.actor }}' | |
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | |
git add -f build/ # Forcefully add the build folder | |
git commit --amend --no-edit | |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/}) | |
git push origin master --force-with-lease | |
echo "Done!" |