2024-09-05 21:32:25 +02:00
|
|
|
name: Build and deploy website
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: sh
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build-and-deploy:
|
|
|
|
runs-on: alpine
|
|
|
|
steps:
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
apk add git openssh rsync
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: 'recursive'
|
|
|
|
- name: Deploy website using rsync
|
|
|
|
run: |
|
|
|
|
eval $(ssh-agent -s)
|
|
|
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' | ssh-add -
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
chmod 700 ~/.ssh
|
2024-12-24 14:32:01 +01:00
|
|
|
rsync -e "ssh -o StrictHostKeyChecking=no" -rvz ./src/ ${{ secrets.SSH_DESTINATION }}:/var/www/louis-vallat.dev/ --delete
|