Merge pull request #16 from 5mdt/revert-15-feature/timer-refactor #56
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
--- | |
# .github/workflows/build.yml | |
name: Build and Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.20.0' | |
- name: Install and run minify | |
run: | | |
go install github.com/tdewolff/minify/v2/cmd/[email protected] | |
mkdir -p ./pages | |
minify -r -o ./pages/ ./*.html | |
minify -r -o ./pages/ ./*.js | |
minify -r -o ./pages/ ./*.svg | |
cp ./LICENSE* ./pages/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
# If you're changing the branch from main, | |
# also change the `main` in `refs/heads/main` | |
# below accordingly. | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./pages |