Skip to content

Update deploy.yml

Update deploy.yml #8

Workflow file for this run

name: Compile and Deploy Jekyll Website
on:
push:
branches:
- deploy
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Ruby Environment
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Compile Jekyll Artifacts
run: |
bundle install
JEKYLL_ENV=production bundle exec jekyll build
- name: Install lftp
run: sudo apt-get update && sudo apt-get install -y lftp
- name: Deploy
env:
PASSWORD: ${{ secrets.SERVER_PASSWORD }}
HOST: ${{ secrets.SERVER_HOST }}
USERNAME: ${{ secrets.SERVER_USERNAME }}
PORT: ${{ secrets.SERVER_PORT }}
TARGET: ${{ secrets.SERVER_TARGET_PATH }}
run: |
lftp -u $USERNAME,"$PASSWORD" sftp://$HOST:$PORT -e "
set sftp:auto-confirm yes;
mirror -R -v --delete _site/ $TARGET;
quit"