wiki/.forgejo/workflows/deploy.yml
Sangelo 5bd62c1919
All checks were successful
/ deploy (push) Successful in 14s
Update workflow to remove target dir before upload
2024-02-15 09:52:25 +01:00

42 lines
1,018 B
YAML

on: [push]
jobs:
deploy:
runs-on: docker
container:
image: ghcr.io/peaceiris/hugo:latest-full
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
run: |
apt-get update
apt-get install -y rsync
- name: Setup Hugo
uses: https://github.com/peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build Hugo Site
run: hugo
- name: Prepare Deployment
run: |
mv public/* .
rmdir public
- name: Deploy to Host
uses: https://github.com/appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIV_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
port: ${{ secrets.SSH_PORT }}
source: .
target: "/var/www/wiki.lunivity.com/"
rm: true