website/.gitea/workflows/action.yml

40 lines
1.0 KiB
YAML
Raw Normal View History

2024-09-22 09:18:39 +03:00
name: pipeline
on:
push:
branches:
- main
jobs:
deploy-job:
runs-on: ubuntu-latest
steps:
- name: init env
run: |
sudo apt-get update
2024-09-22 09:19:37 +03:00
sudo apt-get install -y lftp hugo git
2024-09-22 09:18:39 +03:00
- name: init git
run: |
git clone https://git.fzorb.xyz/bokku/website
cd website
git submodule foreach --recursive git reset --hard
git submodule init
2024-09-22 09:22:17 +03:00
git submodule update --recursive
- name: generate site
run: |
ls -a
cd website
ls -a
hugo
cd ..
2024-09-22 09:18:39 +03:00
- name: init ftp and delete old files
run: |
2024-09-22 11:02:53 +03:00
touch "~/.lftprc"
2024-09-22 11:00:53 +03:00
echo "ssl:verify-certificate false" >> "~/.lftprc"
lftp -u "main","${{ secrets.PASSWORD }}" -p 2021 -e "rm -rf /www; bye" ftp://107.189.28.28
2024-09-22 09:18:39 +03:00
- name: upload new files via ftp
run: |
2024-09-22 11:00:53 +03:00
lftp -u "main","${{ secrets.PASSWORD }}" -p 2021 -e "mirror -R website/public /www; bye" ftp://107.189.28.28