website/.gitea/workflows/action.yml
fzorb b304399788
Some checks failed
pipeline / deploy-job (push) Failing after 33s
create an .ssh directory since it doesn't exist apparently
2025-05-01 07:43:58 +00:00

45 lines
1 KiB
YAML

name: pipeline
on:
push:
branches:
- main
jobs:
deploy-job:
runs-on: docker
container:
image: ubuntu:latest
steps:
- name: init env
run: |
apt-get update
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: |
mkdir ~/.ssh
ssh-keyscan -p 69 fzorb.xyz >> ~/.ssh/known_hosts
- name: upload new files
run: |
sshpass -p '${{secrets.PASSWD}}' rsync -avzh website/public/ -e 'ssh -p 69' git@fzorb.xyz:/var/www/fzorb.xyz
- name: fix perms
run: |
sshpass -p '${{secrets.PASSWD}}' git@fzorb.xyz "chmod 777 -R /var/www/fzorb.xyz"