fix: ci
Some checks failed
Deploy to SFTP Server / build (push) Has been cancelled

This commit is contained in:
max_richter 2024-04-07 21:39:23 +02:00
parent 6fb457c7ce
commit d1e4e93e4a

View File

@ -17,29 +17,6 @@ jobs:
container: git.max-richter.dev/max/website:latest
steps:
- name: setup test files
run: |
mkdir -p dist
echo "Hello, World!" > dist/index.html
- name: 🔑 Configure rclone
run: |
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
chmod 600 /tmp/id_rsa
mkdir -p ~/.config/rclone
echo -e "[sftp-remote]\ntype = sftp\nhost = ${SSH_HOST}\nuser = ${SSH_USER}\nport = ${SSH_PORT}\nkey_file = /tmp/id_rsa\nuse_insecure_cipher = false\nmd5sum_command = none\nsha1sum_command = none" > ~/.config/rclone/rclone.conf
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ vars.SSH_HOST }}
SSH_PORT: ${{ vars.SSH_PORT }}
SSH_USER: ${{ vars.SSH_USER }}
- name: 🚀 Deploy Changed Files via rclone
run: |
rclone sync ./dist/ sftp-remote:${REMOTE_DIR} --sftp-key-file /tmp/id_rsa -v --ignore-existing --transfers 4
env:
REMOTE_DIR: ${{ vars.REMOTE_DIR }}
- name: 🔄 Checkout code
uses: actions/checkout@v3
@ -79,3 +56,20 @@ jobs:
# Install dependencies, build, and generate site output
pnpm i && pnpm build
- name: 🔑 Configure rclone
run: |
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
chmod 600 /tmp/id_rsa
mkdir -p ~/.config/rclone
echo -e "[sftp-remote]\ntype = sftp\nhost = ${SSH_HOST}\nuser = ${SSH_USER}\nport = ${SSH_PORT}\nkey_file = /tmp/id_rsa\nuse_insecure_cipher = false\nmd5sum_command = none\nsha1sum_command = none" > ~/.config/rclone/rclone.conf
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: ${{ vars.SSH_HOST }}
SSH_PORT: ${{ vars.SSH_PORT }}
SSH_USER: ${{ vars.SSH_USER }}
- name: 🚀 Deploy Changed Files via rclone
run: |
rclone sync --update -P ./dist/ sftp-remote:${REMOTE_DIR} --sftp-key-file /tmp/id_rsa -v --ignore-existing --transfers 4
env:
REMOTE_DIR: ${{ vars.REMOTE_DIR }}