-
-
Notifications
You must be signed in to change notification settings - Fork 4
운영: 학습 이미지 제작을 공통 원본과 후처리 기준에 연결 #675
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 Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-c0-compatibility:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout contract source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read pinned C0 contract
id: c0
shell: bash
run: |
python - <<'PY'
import json
import os
from pathlib import Path
contract = json.loads(Path("contracts/webCompatibilityC0.json").read_text(encoding="utf-8"))
commit = contract["source"]["commit"]
if len(commit) != 40:
raise SystemExit("invalid C0 source commit")
with Path(os.environ["GITHUB_OUTPUT"]).open("a", encoding="utf-8") as output:
output.write(f"source_commit={commit}\n")
PY
cp contracts/webCompatibilityC0.json "$RUNNER_TEMP/webCompatibilityC0.json"
cp docs/skills/ops/tools/verifyWebCompatibilityC0.py "$RUNNER_TEMP/verifyWebCompatibilityC0.py"
- name: Checkout pinned C0 source
run: |
git config core.autocrlf false
git checkout --detach "${{ steps.c0.outputs.source_commit }}"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: editor/package-lock.json
- name: Install pinned editor
working-directory: editor
run: npm ci
- name: Build pinned C0 app tree
working-directory: editor
env:
CODARO_WEB_BASE: codaro/app
CODARO_WEB_OUT: ../landing/static/app
run: npm run build
- name: Verify pinned C0 identity
run: >-
python -X utf8 "$RUNNER_TEMP/verifyWebCompatibilityC0.py"
--contract "$RUNNER_TEMP/webCompatibilityC0.json"
--tree landing/static/app
- name: Upload pinned C0 tree
uses: actions/upload-artifact@v4
with:
name: web-compatibility-c0
path: landing/static/app
if-no-files-found: error
retention-days: 90
build:
runs-on: ubuntu-latest
needs: build-c0-compatibility
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: |
editor/package-lock.json
landing/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install Editor
working-directory: editor
run: npm ci
- name: Build Primary Web Run
working-directory: editor
env:
CODARO_WEB_BASE: codaro/run
CODARO_WEB_OUT: ../landing/static/run
run: npm run build
- name: Download pinned C0 app tree
uses: actions/download-artifact@v4
with:
name: web-compatibility-c0
path: landing/static/app
- name: Verify composed C0 identity
run: >-
python -X utf8 docs/skills/ops/tools/verifyWebCompatibilityC0.py
--tree landing/static/app
- name: Install
working-directory: landing
run: npm ci
- name: Build
working-directory: landing
run: npm run build
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: landing/build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
outputs:
page_url: ${{ steps.deployment.outputs.page_url }}
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
verify-deployed-web-to-local:
runs-on: windows-latest
needs: deploy
timeout-minutes: 35
env:
CODARO_DEPLOYED_WEB_URL: ${{ needs.deploy.outputs.page_url }}
CODARO_C0_DEPLOYED_URL: ${{ needs.deploy.outputs.page_url }}app/
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.12
- name: Install Python dependencies
run: uv sync --extra dev --python 3.12
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: editor/package-lock.json
- name: Install editor
working-directory: editor
run: npm ci
- name: Download pinned C0 app tree
uses: actions/download-artifact@v4
with:
name: web-compatibility-c0
path: output/test-runner/web-compatibility-c0/app
- name: Crawl deployed C0 tree
run: >-
uv run python -X utf8 docs/skills/ops/tools/verifyWebCompatibilityC0.py
--tree output/test-runner/web-compatibility-c0/app
--deployed-url "$env:CODARO_C0_DEPLOYED_URL"
--report output/test-runner/web-compatibility-c0/deployed-report.json
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache WebView2 product build
uses: actions/cache@v4
with:
path: output/test-runner/product-browser-webview2-evergreen/cargo-target/
key: webview2-cargo-${{ runner.os }}-${{ hashFiles('launcher/Cargo.lock') }}
- name: Verify deployed Web to installed Local
run: uv run python -X utf8 tests/run.py gate product-browser-webview2-evergreen
- name: Upload deployed product evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: deployed-web-to-local-evidence
path: |
output/test-runner/product-browser-webview2-evergreen/webview2-product-smoke-report.json
output/test-runner/product-browser-webview2-evergreen/deployed-web-learning-archive.json
output/test-runner/product-browser-webview2-evergreen/deployed-local-reexport-learning-archive.json
output/test-runner/product-browser-webview2-evergreen/screenshots/
output/test-runner/product-browser-webview2-evergreen/logs/
output/test-runner/web-compatibility-c0/deployed-report.json
if-no-files-found: error