Files
purplebored.pl/.gitea/workflows/deploy.yml
~purplebored cfed6c0dde
Some checks failed
Deploy Website / deploy (push) Failing after 2s
Add a deploy action
2025-10-30 23:02:26 +01:00

30 lines
753 B
YAML

name: Deploy Website
on:
push:
branches:
- rewrite-static
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${DEPLOY_KEY}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${DEPLOY_HOST}" >> ~/.ssh/known_hosts
- name: Deploy website with rsync
run: |
rsync -avz --delete ./ ${DEPLOY_USER}@${DEPLOY_HOST}:${DEPLOY_PATH}
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}