1
0
Fork 0

Add Gitea Action workflow for Hugo deployment
Hugo Build / Hugo Build (push) Successful in 57s Details

This commit is contained in:
Alex Palaistras 2024-04-12 16:35:07 +01:00
parent aa0e8d7b2e
commit 47097c687d
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
name: Hugo Build
on:
push:
branches:
- trunk
jobs:
build:
runs-on: ubuntu-latest
name: Hugo Build
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y rclone
- name: Build site with Hugo
run: hugo --logLevel info --destination /dist
- name: Deploy to WebDAV
run: |
rclone sync --verbose --webdav-url "${{ vars.WEBDAV_DEPLOY_URL }}" --webdav-user "${{ vars.WEBDAV_DEPLOY_USERNAME }}" --webdav-pass "$(rclone obscure ${{ secrets.WEBDAV_DEPLOY_PASSWORD }})" /dist :webdav: