Add CI/CD workflow to deploy conductor modules to modules-conductor repo#680
Draft
martin-henz wants to merge 2 commits intomasterfrom
Draft
Add CI/CD workflow to deploy conductor modules to modules-conductor repo#680martin-henz wants to merge 2 commits intomasterfrom
martin-henz wants to merge 2 commits intomasterfrom
Conversation
Deploys build artifacts from the conductor-migration branch to source-academy/modules-conductor via GitHub Pages, allowing the conductor version of modules to coexist with the current deployment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Comment on lines
+10
to
+46
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout 🛎️ | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Enable Corepack | ||
| run: corepack enable | ||
|
|
||
| - name: Use Node.js 💻 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: .node-version | ||
| cache: yarn | ||
|
|
||
| - name: Install Dependencies 📦 | ||
| run: yarn install --immutable | ||
|
|
||
| - name: Build Modules 🔧 | ||
| run: yarn workspaces foreach -ptW --from "./src/{bundles,tabs}/*" run build | ||
|
|
||
| - name: Build Manifest | ||
| run: yarn buildtools manifest | ||
|
|
||
| - name: Build All Docs | ||
| run: yarn build:docs | ||
|
|
||
| - name: include java json | ||
| run: cp -r src/java build | ||
|
|
||
| - name: Deploy 🚀 | ||
| uses: peaceiris/actions-gh-pages@v4 | ||
| with: | ||
| deploy_key: ${{ secrets.CONDUCTOR_DEPLOY_KEY }} | ||
| external_repository: source-academy/modules-conductor | ||
| publish_dir: ./build |
Comment on lines
+38
to
+39
| - name: include java json | ||
| run: cp -r src/java build |
There was a problem hiding this comment.
Bug: The cp -r src/java build command will cause the workflow to fail if the src/java directory does not exist, as there is no error handling.
Severity: HIGH
Suggested Fix
Wrap the cp command in a conditional check to ensure it only runs if the src/java directory exists. For example: if [ -d src/java ]; then cp -r src/java build; fi. This prevents the step from failing if the directory is absent.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: .github/workflows/conductor-deploy.yml#L38-L39
Potential issue: The `conductor-deploy.yml` workflow includes the command `cp -r
src/java build`. This command will fail with a non-zero exit code if the `src/java`
directory does not exist on the branch where the workflow is triggered. Since GitHub
Actions treats non-zero exit codes as step failures by default and there is no
conditional check or `continue-on-error` flag, the entire deployment workflow will halt
and fail. The `src/java` directory does not currently exist in the repository's main
branch, making this failure a realistic scenario.
Did we get this right? 👍 / 👎 to inform future reviews.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deploys build artifacts from the conductor-migration branch to source-academy/modules-conductor via GitHub Pages, allowing the conductor version of modules to coexist with the current deployment.