fix: ci
Some checks failed
Deploy to SFTP Server / build (push) Failing after 4s

This commit is contained in:
max_richter 2024-04-07 21:02:09 +02:00
parent 93bb879baf
commit cf74b0f7ef

View File

@ -16,6 +16,29 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: git.max-richter.dev/max/website:latest container: git.max-richter.dev/max/website:latest
steps: steps:
- name: 🔑 Set up SSH Key
run: |
eval `ssh-agent -s`
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
chmod 600 /tmp/id_rsa
ssh-add /tmp/id_rsa
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Create Test Files
run: |
mkdir -p dist
echo "Hello, World!" > dist/index.html
- name: 🚀 Deploy Changed Files via rsync
run: |
rsync -avz -e "ssh -o StrictHostKeyChecking=no -p ${SSH_PORT}" ./dist/ ${SSH_USER}@${SSH_HOST}:${REMOTE_DIR}
env:
SSH_HOST: ${{ vars.SSH_HOST }}
SSH_PORT: ${{ vars.SSH_PORT }}
SSH_USER: ${{ vars.SSH_USER }}
REMOTE_DIR: ${{ vars.REMOTE_DIR }}
- name: 🔄 Checkout code - name: 🔄 Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -55,20 +78,3 @@ jobs:
# Install dependencies, build, and generate site output # Install dependencies, build, and generate site output
pnpm i && pnpm build pnpm i && pnpm build
- name: 🔑 Set up SSH Key
run: |
eval `ssh-agent -s`
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
chmod 600 /tmp/id_rsa
ssh-add /tmp/id_rsa
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: 🚀 Deploy Changed Files via rsync
run: |
rsync -avz -e "ssh -o StrictHostKeyChecking=no -p ${SSH_PORT}" ./dist/ ${SSH_USER}@${SSH_HOST}:${REMOTE_DIR}
env:
SSH_HOST: ${{ vars.SSH_HOST }}
SSH_PORT: ${{ vars.SSH_PORT }}
SSH_USER: ${{ vars.SSH_USER }}
REMOTE_DIR: ${{ vars.REMOTE_DIR }}