CD pipeline
Some checks failed
Prepare and deploy / build (push) Failing after 16s

This commit is contained in:
Guillem George 2026-05-27 15:14:54 +02:00
parent e1814c38f6
commit 760d4c1a20

View file

@ -0,0 +1,39 @@
name: Prepare and deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: docker
container:
image: alpine:3
steps:
- name: Checkout git repository
uses: actions/checkout@v4
- name: Prepare files
run: |
tar cvzf all-in-one.tar.gz .zshrc .p10k.zsh .local/
- name: Install Deployment Tools
run: |
if command -v apk >/dev/null; then
apk add --no-cache rsync openssh-client
else
apt-get update && apt-get install -y rsync openssh-client
fi
- name: Setup SSH
uses: https://github.com/webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy
run: |
rsync -avz -e "ssh -p ${{ secrets.SERVER_PORT }} -o StrictHostKeyChecking=no" --delete \
./all-in-one.tar.gz \
${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:${{ secrets.DESTINATION }}