38 lines
1023 B
YAML
38 lines
1023 B
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 }}" -p 2021 -e "set ssl:verify-certificate no; rm -rf /www; bye" ftp://107.189.28.28
|
|
|
|
- name: upload new files via ftp
|
|
run: |
|
|
lftp -u "main","${{ secrets.PASSWORD }}" -p 2021 -e "set ssl:verify-certificate no;mirror -R website/public /www; bye" ftp://107.189.28.28 |