Skip to content

build(deps): bump picomatch from 2.3.1 to 2.3.2 (#61) #24

build(deps): bump picomatch from 2.3.1 to 2.3.2 (#61)

build(deps): bump picomatch from 2.3.1 to 2.3.2 (#61) #24

name: Deploy Hugo site to GitHub Pages
on:
push:
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: 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
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.152.2
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Hugo
run: |
wget -O hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb
sudo dpkg -i hugo.deb
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Tailwind CSS
run: npx tailwindcss -i assets/css/main.css -o static/css/style.css --minify
- name: Build Hugo site
run: hugo --minify --baseURL "https://www.open62541.org/"
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
- name: Deploy to gh-pages-new
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages-new
force_orphan: false
keep_files: false
commit_message: 'Deploy from ${{ github.sha }}'