22 lines
602 B
YAML
22 lines
602 B
YAML
on: [push]
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
container:
|
|
image: alpine:latest
|
|
steps:
|
|
- name: Install SSH
|
|
run: apk --no-cache add openssh-client
|
|
shell: sh
|
|
|
|
- name: Configure SSH
|
|
run: |
|
|
mkdir -p ~/.ssh/
|
|
chmod 700 ~/.ssh/
|
|
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/staging.key
|
|
chmod 600 ~/.ssh/staging.key
|
|
shell: sh
|
|
|
|
- name: Deploy
|
|
run: ssh -i ~/.ssh/staging.key -o StrictHostKeyChecking=no hadeed@hadeedahmad.xyz 'cd nginx/www; git fetch; git reset --hard origin/main'
|
|
shell: sh
|