Update gh-pages branch #8
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: push to gh-pages | |
run-name: Update gh-pages branch | |
on: | |
push: | |
paths: | |
- '*.html' | |
- '*.js' | |
- '*.css' | |
- 'favicons/' | |
branches: | |
- 'main' | |
jobs: | |
checkout-minify-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Install NodeJS and CLI tools | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- run: npm install -g terser | |
# Perform minification, overwriting original files | |
- run: terser --compress --mangle --output script.js script.js | |
- run: 'echo "yt-player deployment branch" > README.md' | |
# (Force) push changes to `gh-pages` branch | |
- run: | | |
git config user.name Aaron | |
git config user.email [email protected] | |
git commit -am 'Push to deployment branch' | |
git push --force -u origin main:gh-pages |