Skip to content

Conversation

Copy link

Copilot AI commented Jan 23, 2026

Extends the deploy-playground.yml workflow to build and deploy mkdocs documentation alongside the playground at /docs/.

Changes

  • Python setup: Added actions/setup-python@v5 for mkdocs runtime
  • mkdocs build: Install mkdocs-material==9.7.1 (pinned) and run mkdocs build
  • Deploy docs: Copy built site/ directory to _site/docs/ before upload

After deployment:

  • Playground remains at /
  • Documentation available at /docs/
Original prompt

The github action that builds and deploys the playground should also build the documentation using mkdocs and deploy it to the same location as the playground, but under /docs/


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation build and deploy to playground workflow Add mkdocs documentation build to playground deployment workflow Jan 23, 2026
Copilot AI requested a review from Sander-Toonen January 23, 2026 20:45
@Sander-Toonen Sander-Toonen marked this pull request as ready for review January 23, 2026 20:51
Copilot AI review requested due to automatic review settings January 23, 2026 20:51
@Sander-Toonen Sander-Toonen merged commit ee8f26d into master Jan 23, 2026
8 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the playground deployment workflow to build and deploy mkdocs documentation alongside the playground application.

Changes:

  • Adds Python environment setup and mkdocs-material installation to the GitHub Actions workflow
  • Integrates mkdocs documentation build step into the existing playground deployment process
  • Configures deployment structure to serve playground at root (/) and documentation at /docs/

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Install mkdocs
run: pip install mkdocs-material==9.7.1

Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The documentation is being deployed to '/docs/' subdirectory, but the mkdocs.yml configuration has 'site_url: https://pro-fa.github.io/expr-eval/' (without '/docs/'). This mismatch may cause issues with internal links, asset paths, and sitemap generation in the built documentation. Consider either updating mkdocs.yml to set 'site_url: https://pro-fa.github.io/expr-eval/docs/' or using the 'use_directory_urls: false' option, or alternatively modifying this workflow step to update the site_url before building with a command like 'sed -i "s|site_url:.*|site_url: https://pro-fa.github.io/expr-eval/docs/|" mkdocs.yml' before running 'mkdocs build'.

Suggested change
- name: Update mkdocs site_url for /docs/ deployment
run: sed -i 's|^site_url:.*|site_url: https://pro-fa.github.io/expr-eval/docs/|' mkdocs.yml

Copilot uses AI. Check for mistakes.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Consider adding pip caching to improve build performance, similar to how npm is cached for Node.js. The setup-python action supports caching pip dependencies by adding a 'cache' parameter. This would speed up subsequent workflow runs by avoiding re-downloading mkdocs-material and its dependencies each time.

Suggested change
python-version: '3.x'
python-version: '3.x'
cache: 'pip'

Copilot uses AI. Check for mistakes.
cp samples/language-service-sample/examples.js _site/
cp samples/language-service-sample/styles.css _site/
cp dist/bundle.js _site/dist/
cp -r site _site/docs
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The 'site' directory is being copied without first verifying that the mkdocs build step successfully created it. If 'mkdocs build' fails or doesn't produce output, the copy command will fail with a potentially unclear error message. Consider adding a verification step or using a more defensive copy command like 'cp -r site _site/docs || echo "Warning: mkdocs site directory not found"' to make troubleshooting easier. Alternatively, ensure the mkdocs build command will fail the workflow if it encounters an error.

Suggested change
cp -r site _site/docs
if [ -d site ]; then
cp -r site _site/docs
else
echo "Warning: mkdocs 'site' directory not found; skipping docs copy"
fi

Copilot uses AI. Check for mistakes.
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