Skip to content

v1.9.0

v1.9.0 #28

# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy site to Pages
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
id-token: write
pages: write
pull-requests: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
# renovate: datasource=github-tags depName=golang/go
go-version: '1.23.2'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
# renovate: datasource=github-releases depName=gohugoio/hugo
hugo-version: '0.136.5'
extended: true
- name: Build
working-directory: ./exampleSite
run: hugo --minify --themesDir ../.. --baseURL https://chrede88.github.io/L1nkr/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./exampleSite/public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# # Test site using Lighthouse
# lighthouse:
# name: Run Lighthouse
# runs-on: ubuntu-22.04
# timeout-minutes: 5
# needs: deploy
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# submodules: true
# fetch-depth: 0
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# - run: npm install
# - run: npm run lighthouse
# - name: Generate token
# uses: tibdex/github-app-token@v2
# id: generate-token
# with:
# app_id: ${{ secrets.APP_ID }}
# private_key: ${{ secrets.APP_PRIVATE_KEY }}
# - name: Create Pull Request
# uses: peter-evans/create-pull-request@v5
# with:
# token: ${{ steps.generate-token.outputs.token }}
# commit-message: "🚦 Updating Lighthouse bagdes"
# branch: lighthouse
# delete-branch: true
# base: main
# title: 'Updating Lighthouse bagdes'
# body: |
# New Lighthouse tests results on latest deployed exampleSite.
# labels: lighthouse
# assignees: Chrede88
# reviewers: Chrede88
# draft: false