added the hugo-deploy action
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# gitea/actions/hugo-deploy.yml
|
||||
name: Deploy Hugo Site
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Hugo
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y hugo
|
||||
|
||||
- name: Build Hugo Site
|
||||
run: hugo --minify
|
||||
|
||||
- name: Deploy to Hugo Container
|
||||
run: |
|
||||
rsync -avz --delete public/ /mnt/hugo/
|
||||
env:
|
||||
HUGO_CONTAINER_PATH: /mnt/hugo/
|
||||
GITEA_RUNNER_MOUNT_PATH: ./hugo/public:/mnt/hugo
|
||||
Reference in New Issue
Block a user