Add a build plan
This commit is contained in:
parent
9a2f3d287a
commit
117c01bb93
1 changed files with 48 additions and 0 deletions
48
.github/workflows/build-site.yml
vendored
Normal file
48
.github/workflows/build-site.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
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/*
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: assets/package-lock.json
|
||||||
|
- 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 global npm packages
|
||||||
|
run: |
|
||||||
|
npm -g install
|
||||||
|
- 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"
|
Loading…
Reference in a new issue