revenue #195
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: 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" |