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: | git clone https://tea.ahmza.com/ahmza/ahmza-dad.git /home/${{ secrets.SSH_USER }}/repo 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