added deploy wf
Deploy / deploy (push) Failing after 10s

This commit is contained in:
Hamza Ahmed
2026-03-11 11:33:10 +00:00
parent 8f44491f99
commit a0bd1fa3d2
+30
View File
@@ -0,0 +1,30 @@
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: Generate HTML
run: pandoc index.md -s -o index.html --css styles.css
- name: Deploy to server via SSH
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT || '22' }}
script: |
cp /home/${{ secrets.SSH_USER }}/repo/index.html /usr/share/nginx/html/
cp /home/${{ secrets.SSH_USER }}/repo/styles.css /usr/share/nginx/html/
nginx -s reload