Homepage/.forgejo/workflows/deploy.yml

35 lines
802 B
YAML
Raw Normal View History

2025-05-25 01:53:55 -07:00
name: publish
2025-03-29 15:27:16 -06:00
2025-05-25 01:53:55 -07:00
on:
push:
branches:
- main
2025-03-29 15:27:16 -06:00
jobs:
2025-05-25 01:53:55 -07:00
publish:
2025-05-25 01:54:36 -07:00
runs-on: docker
2025-05-25 03:09:48 -07:00
container:
image: ghcr.io/hugomods/hugo:exts-0.140.2
2025-05-25 01:53:55 -07:00
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
2025-03-29 15:27:16 -06:00
steps:
2025-05-25 01:53:55 -07:00
- uses: https://forge.melm.xyz/melmco/checkout@v4
2025-03-29 15:27:16 -06:00
with:
2025-05-25 01:53:55 -07:00
submodules: recursive
fetch-depth: 0 # all history for all branches and tags\
- name: Build
run: |
hugo --minify
2025-05-25 03:09:48 -07:00
- name: rsync deployments
2025-05-25 03:14:25 -07:00
uses: https://forge.melm.xyz/melmco/rsync-deployments@7.0.2
2025-05-25 03:09:48 -07:00
with:
2025-05-25 03:25:34 -07:00
switches: -avzr --delete
path: ./public/
remote_path: /var/www/html/melm.xyz/
remote_host: 192.168.1.145
remote_user: forgejo
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}