chore: github action

This commit is contained in:
sauravdhakal12
2025-12-29 21:10:07 +05:45
parent 04fe31a60c
commit 5a5fcb73f1

34
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Deploy Hugo Site
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
extended: true
- name: Build site
run: hugo --minify
- name: Deploy via rsync
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "public/*"
target: "/var/www/portfolio"
strip_components: 1