Skip to content
This repository has been archived by the owner on Feb 2, 2025. It is now read-only.

Update deploy_website.yml #1

Update deploy_website.yml

Update deploy_website.yml #1

Workflow file for this run

name: Deploy Hugo Site
on:
push:
branches:
- testing
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build Hugo Site
run: hugo --source ./website
- name: Deploy to Server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.NEW_SERVER_HOST }}
username: ${{ secrets.DOCS_USER }}
key: ${{ secrets.DOCS_PRIVATE_KEY }}
script: |
cd /path/to/your/hugo/site/directory
git pull origin main
hugo --source ./website
# Optional: sudo systemctl restart nginx