2022-02-02 07:11:47 +00:00
|
|
|
name: Build and Deploy Site
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-03-22 00:05:10 +00:00
|
|
|
- master
|
2022-02-02 07:11:47 +00:00
|
|
|
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/*
|
|
|
|
cache: npm
|
|
|
|
cache-dependency-path: assets/package-lock.json
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
2022-03-22 00:05:10 +00:00
|
|
|
hugo-version: "latest"
|
2022-02-02 07:11:47 +00:00
|
|
|
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 global npm packages
|
|
|
|
run: |
|
2022-03-22 02:49:20 +00:00
|
|
|
npm -g install postcss@8.4.6 postcss-cli@9.1.0 postcss-purgecss@2.0.3
|
2022-02-02 07:11:47 +00:00
|
|
|
- name: Install local npm packages
|
|
|
|
run: |
|
|
|
|
cd assets
|
|
|
|
npm install
|
|
|
|
cd ..
|
|
|
|
- name: Run Hugo
|
|
|
|
run: |
|
|
|
|
hugo
|
|
|
|
cp ${GITHUB_WORKSPACE}/{CNAME,.nojekyll} public
|
|
|
|
- name: Deploy to gh-pages
|
|
|
|
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"
|