1
0
Fork 0
go.deuill.org/.gitea/workflows/hugo.yaml

26 lines
786 B
YAML

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: