blakerain.com/.gitea/workflows/deploy.yaml
Blake Rain aed16a9809
All checks were successful
check / check (push) Successful in 28s
fix: incorrect path name in SSH command
2024-08-28 15:15:42 +01:00

50 lines
1.0 KiB
YAML

name: deploy
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
deploy-site:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install node dependencies
run: |
npm i
- name: Setup node
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Setup hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: latest
extended: true
- name: Build the site
run: hugo --minify
- name: Deploy the site
run: |
echo "${{ secrets.SSH_DEPLOYMENT_KEY }}" > deploy_key
chmod 600 ./deploy_key
rsync -chrlvzi --delete \
-e 'ssh -i ./deploy_key -p 22 -o StrictHostKeyChecking=no' \
public/ \
blakerain-com@85.10.205.2:~/www/
rm ./deploy_key