This commit is contained in:
parent
93bb879baf
commit
cf74b0f7ef
40
.github/workflows/default.yaml
vendored
40
.github/workflows/default.yaml
vendored
@ -16,6 +16,29 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: git.max-richter.dev/max/website:latest
|
||||
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
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@ -55,20 +78,3 @@ jobs:
|
||||
# Install dependencies, build, and generate site output
|
||||
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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user