Skip to content

Create static.yml

Create static.yml #3

Workflow file for this run

---
# .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/minify@latest
mkdir -p ./pages
minify -r -o ./pages/ ./*.html
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