You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pages/.github/workflows/build-site.yml

49 lines
1.4 KiB
YAML

2 years ago
name: Build and Deploy Site
on:
push:
branches:
- master
2 years ago
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:
hugo-version: "latest"
2 years ago
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: |
npm install postcss@^8.4.6 postcss-cli@^9.1.0 @fullhuman/postcss-purgecss@^2.0.3
npm -g install postcss@^8.4.6 postcss-cli@^9.1.0 @fullhuman/postcss-purgecss@^2.0.3
2 years ago
- name: Install local npm packages
run: |
cd assets
npm install
cd ..
- name: Run Hugo
run: |
hugo
- 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"