1
0
Fork 0

Compare commits

...

2 Commits

Author SHA1 Message Date
Digital Studium 39283f63b6 ttf
deploy Details
2023-05-09 15:42:43 +03:00
Digital Studium 7e4b06a217 Change deploy method 2023-05-09 15:33:19 +03:00
3 changed files with 18 additions and 6 deletions

View File

@ -25,9 +25,12 @@ jobs:
- name: Build website - name: Build website
run: hugo --minify run: hugo --minify
- name: Deploy website - name: Deploy to Server
run: hugo deploy uses: https://github.com/easingthemes/ssh-deploy@main
env: env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }} ARGS: "-rlgoDzvc -i --delete"
SOURCE: "public/"
REMOTE_HOST: digitalstudium.com
REMOTE_USER: root
TARGET: /srv/digitalstudium.com

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.hugo_build.lock .hugo_build.lock
/venv/ /venv/
/public/

8
deploy Executable file
View File

@ -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