Skip to content

Deploy Docs

Deploy Docs #5

Workflow file for this run

name: Deploy Docs
permissions:
contents: write
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-20.04
env:
HUGO_VERSION: 0.123.8
steps:
-
name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
-
name: Install Dart Sass
run: sudo snap install dart-sass
-
name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
-
name: Install Node.js dependencies
working-directory: ./docs
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
-
name: Build with Hugo
working-directory: ./docs
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "https://docs.natster.io"
-
name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./docs/public/
clean-exclude: pr-preview