test deploy workflow
Some checks failed
Deploy landing / deploy (push) Has been cancelled

This commit is contained in:
snusxd
2026-02-28 12:58:46 +03:00
parent de77b32b5a
commit b1e738ca20
2 changed files with 30 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
name: Deploy landing
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: prepare ssh
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: deploy on server
run: |
ssh -i ~/.ssh/id_ed25519 \
-p "${{ secrets.SSH_PORT }}" \
"${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}" \
'cd /srv/snusxd/landing && git fetch origin && git reset --hard origin/main'