2023-08-21 16:12:02 +00:00
|
|
|
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
|
|
|
|
|
2023-08-21 18:05:30 +00:00
|
|
|
- name: Deploy
|
2023-08-21 18:58:28 +00:00
|
|
|
run: ssh -i ~/.ssh/staging.key -o StrictHostKeyChecking=no hadeed@hadeedahmad.xyz 'cd nginx/www; git fetch; git reset --hard origin/main'
|
2023-08-21 16:12:02 +00:00
|
|
|
shell: sh
|