From 7e4b06a217c941b113784f09a690b36feaf86b24 Mon Sep 17 00:00:00 2001 From: Digital Studium Date: Tue, 9 May 2023 15:33:19 +0300 Subject: [PATCH] Change deploy method --- .gitea/workflows/deploy.yaml | 9 +-------- .gitignore | 3 ++- deploy | 8 ++++++++ 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100755 deploy diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index d8605ac..82e246c 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -22,12 +22,5 @@ jobs: hugo-version: "0.110.0" extended: true - - name: Build website - run: hugo --minify - - name: Deploy website - run: hugo deploy - env: - AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }} - + run: ./deploy diff --git a/.gitignore b/.gitignore index 3f93e15..44ccf2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .hugo_build.lock -/venv/ \ No newline at end of file +/venv/ +/public/ \ No newline at end of file diff --git a/deploy b/deploy new file mode 100755 index 0000000..db0dbd7 --- /dev/null +++ b/deploy @@ -0,0 +1,8 @@ +#!/bin/sh +USER=root +HOST=digitalstudium.com +DIR=/srv/$HOST # the directory where your web site files should go + +hugo --minify && rsync -avz --delete public/ ${USER}@${HOST}:${DIR} # this will delete everything on the server that's not in the local public folder + +exit 0 \ No newline at end of file