Skip to content

astime

astime #72

Workflow file for this run

name: ⚙ Build the Hugo Site
on:
workflow_call:
outputs:
base_url:
description: "The Base URL of the site"
value: ${{ jobs.build.outputs.base_url }}
push:
branches:
- main
tags-ignore:
- generated.**
paths-ignore:
- '.github/**'
permissions: write-all
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
outputs:
base_url: ${{ steps.pages.outputs.base_url }}
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: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.10.0
- name: Install dependencies
run: npm ci
- name: Pull
run: git pull
- name: Build
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
outputs:
base_url: ${{ needs.build.outputs.base_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v2