feat: moved to gitea workflows for CI/CD
Some checks failed
Build and deploy website / Build-and-deploy (push) Failing after 6s

Signed-off-by: Louis Vallat <contact@louis-vallat.dev>
This commit is contained in:
Louis Vallat 2024-09-05 21:32:25 +02:00
parent 4b9173728b
commit 6f0858757f
Signed by: louis
SSH Key Fingerprint: SHA256:usb9EA8eIADT+Bt0Ne8ZkISCbgPSOYkVgS2iZqdZj8s
2 changed files with 28 additions and 20 deletions

View File

@ -0,0 +1,28 @@
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 ./public/ ${{ secrets.SSH_DESTINATION }}:/var/www/louis-vallat.dev/ --delete

View File

@ -1,20 +0,0 @@
image: alpine
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- deploy
deploy:
stage: deploy
before_script:
- apk add openssh zola rsync
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
script:
- rsync -e "ssh -o StrictHostKeyChecking=no -p $SSH_PORT" -rvz ./src/ $SSH_DESTINATION:/var/www/louis-vallat.dev/ --delete
only:
- master