website/.gitea/workflows/action.yml
fzorb 3b97bfcd89
Some checks failed
pipeline / deploy-job (push) Failing after 28s
maybe putting the password in '' will work
2024-11-30 23:02:11 +02:00

43 lines
1.0 KiB
YAML

name: pipeline
on:
push:
branches:
- main
jobs:
deploy-job:
runs-on: ubuntu-latest
steps:
- name: init env
run: |
sudo apt-get update
sudo apt-get install -y rsync openssh-client hugo git sshpass
- name: init git
run: |
git clone https://git.fzorb.xyz/fzorb/website
cd website
git submodule foreach --recursive git reset --hard
git submodule init
git submodule update --recursive
- name: generate site
run: |
ls -a
cd website
ls -a
hugo
- name: init ssh
run: |
ssh-keyscan -p 22 10.14.0.205 >> ~/.ssh/known_hosts
- name: upload new files
run: |
rsync -avzh website/public/ -e "sshpass -p '${{secrets.PASSWD}}'" --omit-dir-times git@10.14.0.205:/var/www/fzorb.xyz
- name: fix perms
run: |
sshpass -p '${{secrets.PASSWD}}' git@10.14.0.205 "chmod 755 -R /var/www/fzorb.xyz"