ci: force FTPS on FTP-Deploy-Action instead of cleartext default #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Hostinger | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: deploy-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: FTP-sync static surface to pv.kineticgain.com | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Verify build | |
| run: | | |
| test -f index.html || (echo "FAIL: index.html missing" && exit 1) | |
| test -f .htaccess || (echo "FAIL: .htaccess missing" && exit 1) | |
| grep -q "Pharmacovigilance Review and Reporting Hub" index.html || (echo "FAIL: index.html missing title" && exit 1) | |
| echo "OK: verified" | |
| ls -lah | |
| - name: FTP Deploy | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.5 | |
| with: | |
| server: ${{ secrets.FTP_SERVER }} | |
| protocol: ftps # FTPS, not cleartext ftp (action default) | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| local-dir: ./ | |
| server-dir: /pv/ | |
| exclude: | | |
| **/.git* | |
| **/.git*/** | |
| **/.github/** | |
| **/node_modules/** | |
| README.md | |
| CHANGELOG.md | |
| LICENSE | |
| - name: Verify live | |
| run: | | |
| sleep 30 | |
| curl -fsSL --max-time 15 "https://pv.kineticgain.com/" > /tmp/live.html || exit 1 | |
| grep -q "Pharmacovigilance Review and Reporting Hub" /tmp/live.html || (echo "FAIL: live render missing title" && exit 1) | |
| echo "OK: live at https://pv.kineticgain.com/" |