Repository navigation
feat: 示例画廊(打开即见) + 11套跨学科示例 + window.CourseForge 接口 (v0.3, 借鉴 bento) #2
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 CourseForge to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'course-editor/**' | |
| - '.github/workflows/deploy-pages.yml' | |
| workflow_dispatch: | |
| 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/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # 整个 course-editor 目录即站点根(index.html 用相对路径引用 libs/) | |
| path: course-editor | |
| 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 |