Files
ahmza-dad/.gitea/workflows/deploy.yml
T
Hamza Ahmed a2bb6bf982
Deploy / deploy (push) Failing after 14s
Fix black-screen render: build with pandoc template
- Convert template.html to a pandoc template ($title$/$body$)
- Update CI deploy and docs to use --template template.html
- Fix header.html title to match canonical
- Ignore generated index.html (regenerated by CI)
- Update AGENTS.md build commands and file structure
2026-07-20 20:07:36 +00:00

37 lines
1.1 KiB
YAML

name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pandoc
run: apt-get update && apt-get install -y pandoc
- name: Generate HTML
run: pandoc index.md -s -o index.html --template template.html
- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
- name: Deploy to server via SCP
run: |
scp -P ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
index.html styles.css nginx.conf \
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/ahmza.dad/
- name: Reload nginx
run: |
ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} \
"sudo nginx -s reload || sudo systemctl reload nginx || sudo systemctl restart nginx"