Generate & Deploy Reports #17
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
| # .github/workflows/deploy-reports.yml | |
| # | |
| # Required repository secrets: | |
| # FTP_HOST — GoDaddy FTP hostname (find in cPanel → FTP Accounts, e.g. 198.71.xxx.xxx or ftp.yourdomain.com) | |
| # FTP_USER — FTP username (from cPanel → FTP Accounts) | |
| # FTP_PASSWORD — FTP password | |
| # FTP_PATH — remote directory WITH trailing slash (e.g. /public_html/) | |
| name: Generate & Deploy Reports | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '**.csv' | |
| - '**.md' | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 2 * * *' | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout data repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Generate static report pages | |
| run: node generate-reports.js | |
| env: | |
| SITE_URL: https://quantumtracker.org | |
| - name: Prepare deploy folder | |
| run: | | |
| mkdir -p deploy | |
| cp -r reports/ deploy/reports/ | |
| cp sitemap.xml deploy/sitemap.xml | |
| echo "=== Files to deploy ===" | |
| find deploy/ -type f | sort | |
| - name: Deploy to GoDaddy via FTP | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.5 | |
| with: | |
| server: ${{ secrets.FTP_HOST }} | |
| username: ${{ secrets.FTP_USER }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| server-dir: ${{ secrets.FTP_PATH }} | |
| local-dir: ./deploy/ | |
| dangerous-clean-slate: false | |
| log-level: minimal |