Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nett00n authored Nov 14, 2023
1 parent 51c01b0 commit 8d05010
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# .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

0 comments on commit 8d05010

Please sign in to comment.