1
0
Fork 0
mirnet.org/.forgejo/workflows/deploy.yaml

24 lines
768 B
YAML
Raw Normal View History

2024-09-12 13:41:14 -04:00
name: Hugo
on:
push:
branches:
- main
jobs:
build:
runs-on: hugo-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Run build task
run: hugo --minify
- name: pre-compress
run: find ./public/* -type f \( -name '*.html' -o -name '*.js' -o -name '*.css' \) -exec gzip -v -k -f --best {} \;
2024-09-12 13:58:55 -04:00
- name: Rsync to first remote server
run: |
rsync -rlgoDzvc -i --delete public/ "${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:${{ secrets.REMOTE_TARGET }}"Z
- name: Rsync to second remote server
run: |
rsync -rlgoDzvc -i --delete public/ "${{ secrets.REMOTE_USER1 }}@${{ secrets.REMOTE_HOST1 }}:${{ secrets.REMOTE_TARGET }}"