This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Static Site CI #118
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: Static Site CI | |
| on: | |
| schedule: | |
| - cron: "0 1 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| site: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: upptime/uptime-monitor@v1.41.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| command: site | |
| - name: Find and deploy built site | |
| run: | | |
| # Find where sapper exported | |
| EXPORT_DIR=$(find . -path '*/__sapper__/export' -type d 2>/dev/null | head -1) | |
| if [ -z "$EXPORT_DIR" ]; then | |
| echo "No __sapper__/export found, listing directories:" | |
| find . -name 'export' -type d 2>/dev/null | |
| find . -name 'index.html' 2>/dev/null | head -5 | |
| exit 1 | |
| fi | |
| echo "Found export at: $EXPORT_DIR" | |
| ls -la "$EXPORT_DIR" | |
| # Deploy to gh-pages | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Copy export to temp | |
| cp -r "$EXPORT_DIR" /tmp/site-export | |
| echo "status.cerul.ai" > /tmp/site-export/CNAME | |
| touch /tmp/site-export/.nojekyll | |
| # Switch to gh-pages | |
| git checkout --orphan gh-pages-new | |
| git rm -rf . 2>/dev/null || true | |
| cp -r /tmp/site-export/* . | |
| cp /tmp/site-export/.nojekyll . | |
| git add -A | |
| git commit -m "Deploy status page" | |
| git push origin gh-pages-new:gh-pages --force |