website/.gitea/workflows/action.yml
fzorb 8486b08527
Some checks failed
pipeline / deploy-job (push) Failing after 49s
Update .gitea/workflows/action.yml
2024-09-22 09:25:38 +03:00

42 lines
1.1 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 lftp hugo git
- name: init git
run: |
git clone https://git.fzorb.xyz/bokku/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
cd ..
- name: init ftp and delete old files
run: |
lftp -u "main","${{ secrets.PASSWORD }}" -e "rm -rf /www; bye" -p 2021 ftp://107.189.28.28
- name: upload new files via ftp
run: |
lftp -u "main","${{ secrets.PASSWORD }}" -e "mirror -R website/public /www; bye" -p 2021 ftp://107.189.28.28
- name: fix perms via ftp
run: |
lftp -u "main","${{ secrets.PASSWORD }}" -e "chmod -R 755 /www; bye" -p 2021 ftp://107.189.28.28