pages/.github/workflows/build-site.yml
Thomas A. Christensen II 212caea3c4
Switch to purging css only in production
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
2022-03-26 21:01:43 -05:00

44 lines
1.2 KiB
YAML

name: Build and Deploy Site
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: lts/*
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Configure npm
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" ${{ secrets.FONTAWESOME_TOKEN }}
- name: Install postcss
run: |
npm -g install postcss-cli
- name: Install npm packages
run: |
npm install
- name: Run Hugo
run: |
hugo --environment production --minify
- name: Deploy to gh-pages
if: ${{ !env.ACT }}
uses: rdarida/simple-github-pages-deploy-action@v1
with:
git-user: "MillironX"
git-email: "25492070+MillironX@users.noreply.github.com"
git-base-folder: "public"
commit-message: "Build and deploy"
branch: "gh-pages"