Skip to content

2.42.0

2.42.0 #160

Workflow file for this run

name: Minify data
on:
push:
branches: main
defaults:
run:
shell: bash
env:
USER: 'pm-random'
REPO: 'data'
BRANCH: 'gh-pages'
MESSAGE: 'minify'
jobs:
minify:
runs-on: ubuntu-latest
name: minify
steps:
- uses: actions/[email protected]
- name: Minify json
run: node minify_json.mjs
- name: Setup local repository
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git branch $BRANCH
git checkout $BRANCH
git add images/ json/
- name: Delete workflow folder and minifying script
run: git rm -rf .github/ minify_json.mjs
- name: Push minified data to origin
run: |
git commit -m "$MESSAGE"
git push -f "https://$USER:${{ secrets.GITHUB_TOKEN }}@github.com/$USER/$REPO.git"