1
Fork 0
personal_website/.forgejo/workflows/deploy.yml

23 lines
604 B
YAML
Raw Normal View History

2023-08-21 16:12:02 +00:00
on: [push]
jobs:
2023-08-22 11:42:31 +00:00
deploy:
2023-08-21 16:12:02 +00:00
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