website/.gitea/workflows/build_and_deploy.yml
Louis Vallat c6b08d76ac
All checks were successful
Build and deploy website / Build-and-deploy (push) Successful in 5s
feat: moved to gitea workflows for CI/CD
Signed-off-by: Louis Vallat <contact@louis-vallat.dev>
2024-09-05 21:33:55 +02:00

29 lines
742 B
YAML

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
rsync -e "ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }}" -rvz ./src/ ${{ secrets.SSH_DESTINATION }}:/var/www/louis-vallat.dev/ --delete