공급망: 게시 package byte 재현을 계약화 #277
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 Pages 데모 배포. 빌드 없음(네이티브 ESM): 저장소 파일을 그대로 조립해 올린다. | |
| # GH Pages는 응답 헤더를 직접 달 수 없으므로 데모 전용 Service Worker가 COOP, COEP를 | |
| # 주입하고 첫 방문에 한 번만 다시 연다. 패키지 소비자는 README의 서버 헤더 계약을 따른다. | |
| name: pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | |
| with: | |
| node-version: 22 | |
| # RED 커밋이 공개 진열장으로 나가지 않게 한다. 배포는 사람이 보는 표면이고, 구조 게이트는 | |
| # 의존성 0이라 여기서 도는 비용이 거의 없다(브라우저 게이트는 ci job이 본다). | |
| - run: npm ci | |
| - run: npm test | |
| - name: GitHub Pages 무헤더 환경에서 데모 COI 부트스트랩 검증 | |
| run: npm run test:examples | |
| env: | |
| PYPROC_BROWSER: /usr/bin/google-chrome | |
| PYPROC_NO_COI: "1" | |
| - name: 데모 사이트 조립 (예제 + 소유 엔진 + 브랜드 자산 + COI 진입점 + 랜딩 루트 승격) | |
| run: | | |
| mkdir -p _site | |
| # assets: 파비콘·헤더 로고가 참조하는 브랜드 마크 정본(랜딩은 assets/, 예제는 ../assets/). | |
| cp -r examples src assets _site/ | |
| cp index.js index.d.ts LICENSE _site/ | |
| cp coiServiceWorker.js _site/coiServiceWorker.js | |
| # 랜딩은 examples/index.html이 정본이고 배포 루트로 승격된다(상대 경로가 루트 기준). | |
| mv _site/examples/index.html _site/index.html | |
| - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3 | |
| with: | |
| path: _site | |
| - id: deployment | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4 |