Skip to content

Add CI/CD workflow to deploy conductor modules to modules-conductor repo#680

Draft
martin-henz wants to merge 2 commits intomasterfrom
conductor-migration
Draft

Add CI/CD workflow to deploy conductor modules to modules-conductor repo#680
martin-henz wants to merge 2 commits intomasterfrom
conductor-migration

Conversation

@martin-henz
Copy link
Copy Markdown
Member

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.

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>
@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@martin-henz martin-henz marked this pull request as draft April 16, 2026 02:36
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@martin-henz martin-henz reopened this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants