fix: 다크모드 iOS 상태바 띠가 하얗게 남던 문제 — html 캔버스 배경 다크 대응 (#96) #145
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 PWA to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| schedule: | |
| # 매일 18:00 UTC(KST 03:00) — 낱알 데이터셋 최신화 후 재배포 | |
| - cron: '0 18 * * *' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| # 데이터셋 재사용: push 배포는 캐시된 데이터셋을 그대로 써서 전수 재수집(수분)을 생략. | |
| # cron(매일)·수동 실행만 새로 수집해 최신화하고 캐시를 갱신한다. | |
| - name: Restore dataset cache | |
| id: dataset | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: public/data | |
| key: dataset-${{ github.run_id }} | |
| restore-keys: | | |
| dataset- | |
| - name: Build dataset (cron·수동, 또는 캐시 없음) | |
| # data.go.kr 디코딩 키를 Secret(SERVICE_KEY)로 주입해 전체 데이터 생성. | |
| if: ${{ github.event_name != 'push' || steps.dataset.outputs.cache-matched-key == '' }} | |
| env: | |
| SERVICE_KEY: ${{ secrets.SERVICE_KEY }} | |
| run: node scripts/build-dataset.mjs | |
| - name: Save dataset cache | |
| if: ${{ github.event_name != 'push' || steps.dataset.outputs.cache-matched-key == '' }} | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: public/data | |
| key: dataset-${{ github.run_id }} | |
| # push 배포(캐시 재사용)는 build-dataset 를 건너뛰므로, 캐시의 옛 marks.json 대신 | |
| # 레포에 커밋된 마크 gif 기준으로 marks.json 을 다시 생성(새로 커밋한 마크 반영). | |
| - name: Rebuild marks.json from committed gifs | |
| if: ${{ github.event_name == 'push' && steps.dataset.outputs.cache-matched-key != '' }} | |
| run: node scripts/rebuild-marks.mjs | |
| - name: Build | |
| # 프론트가 호출할 Worker 엔드포인트를 repo Variables(VITE_API_BASE)로 주입. | |
| # 미설정 시 데모(목) 모드로 빌드됨. | |
| env: | |
| VITE_API_BASE: ${{ vars.VITE_API_BASE }} | |
| run: npm run build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |