chore: change compute action #11
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 Action | |
on: | |
push: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.10.0" | |
- uses: actions/checkout@v4 | |
- name: Install & Build | |
run: | | |
yarn install --immutable --immutable-cache --check-cache | |
yarn build | |
- name: Commit and Push generated dist | |
run: | | |
git config --global user.name 'ubiquity-os[bot]' | |
git config --global user.email 'ubiquity-os[bot]@users.noreply.github.com' | |
git add -f ${{ github.workspace }}/dist/\* | |
if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then | |
git pull | |
git commit -m "chore: updated dist" || echo "Lint-staged check failed" | |
git push origin HEAD:${{ github.ref_name }} | |
else | |
echo "No changes to commit" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |