This commit is contained in:
parent
6fb457c7ce
commit
d1e4e93e4a
40
.github/workflows/default.yaml
vendored
40
.github/workflows/default.yaml
vendored
@ -17,29 +17,6 @@ jobs:
|
|||||||
container: git.max-richter.dev/max/website:latest
|
container: git.max-richter.dev/max/website:latest
|
||||||
steps:
|
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
|
- name: 🔄 Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -79,3 +56,20 @@ jobs:
|
|||||||
# Install dependencies, build, and generate site output
|
# Install dependencies, build, and generate site output
|
||||||
pnpm i && pnpm build
|
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 }}
|
||||||
|
Loading…
Reference in New Issue
Block a user