40 lines
No EOL
928 B
YAML
40 lines
No EOL
928 B
YAML
name: Deploy
|
|
|
|
on: [ push ]
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Hugo
|
|
run: |
|
|
curl -L -o hugo_0.140.0_linux-amd64.tar.gz https://github.com/gohugoio/hugo/releases/download/v0.140.0/hugo_0.140.0_linux-amd64.tar.gz
|
|
tar zxvf hugo_0.140.0_linux-amd64.tar.gz
|
|
|
|
- name: Build
|
|
run: ./hugo
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: website
|
|
path: public/
|
|
|
|
deploy:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: website
|
|
|
|
- name: Install lftp
|
|
run: |
|
|
apt update
|
|
apt install -y lftp
|
|
|
|
- name: Deploy website
|
|
run: lftp -c "open -u $FTP_USER,$FTP_PASS $FTP_HOST; mirror -R public/ ~/$FTP_DIR; quit" |