curriculum_updated #175
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: Engine CI/CD | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| repository_dispatch: | |
| types: [curriculum_updated] | |
| jobs: | |
| build-and-deploy: | |
| name: Build & Validate Site | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Engine | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Clone Curriculum (main) | |
| run: git clone https://github.com/ThePythonLedger/Curriculum.git ../Curriculum | |
| - name: Install and Build | |
| run: | | |
| npm ci | |
| npm run build | |
| # Deploy ONLY on main branch pushes or curriculum dispatch events (skipped on PRs) | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' || github.event_name == 'repository_dispatch' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build |