Update README.md #40
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: Jekyll build and minify HTML | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'extensions/**' | |
- 'release/**' | |
- 'download/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
- name: Install dependencies | |
run: | | |
gem install bundler -v 2.4.22 | |
bundle _2.4.22_ install | |
- name: Build the site | |
run: bundle exec jekyll build | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install Node.js dependencies | |
run: | | |
npm ci | |
- name: Run script | |
run: node .github/workflows/minify-html.js | |
- name: Commit and push if it's necessary | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git diff --quiet && git diff --staged --quiet || git commit -m 'Auto update from GitHub Action' | |
git push |