Fix: lightbox mobile safe-area uses padding instead of gradient fade #44
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: Build & Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 6 1 * *' # 1st of every month, 06:00 UTC — refreshes OG image | |
| - cron: '0 6 * * 1' # every Monday, 06:00 UTC — picks up Glass edits/new photos | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changed: ${{ steps.sidecars.outputs.changed }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install system fonts | |
| run: sudo apt-get install -y fonts-open-sans fonts-liberation | |
| - name: Cache Glass API response | |
| uses: actions/cache@v4 | |
| with: | |
| path: .cache | |
| key: photos-cache-${{ runner.os }}-${{ github.run_id }} | |
| restore-keys: photos-cache-${{ runner.os }}- | |
| - name: Sync Glass API | |
| run: npm run sync:glass | |
| env: | |
| GLASS_TOKEN: ${{ secrets.GLASS_TOKEN }} | |
| - name: Check for sidecar/Glass drift | |
| if: github.event_name == 'schedule' | |
| run: node scripts/sweep-glass-drift.js | |
| - name: Build | |
| run: npm run build | |
| env: | |
| SITE_URL: https://photos.thedataareclean.com | |
| GLASS_TOKEN: ${{ secrets.GLASS_TOKEN }} | |
| - name: Commit new sidecars | |
| id: sidecars | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add glass-sidecars/ | |
| if git diff --cached --quiet; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| git commit -m "Chore: auto-sync new Glass sidecars [skip ci]" | |
| git push origin main | |
| fi | |
| - name: Upload pages artifact | |
| if: github.event_name != 'schedule' || steps.sidecars.outputs.changed == 'true' | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: dist/ | |
| deploy: | |
| needs: build | |
| if: github.event_name != 'schedule' || needs.build.outputs.changed == 'true' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |