This directory contains automated workflows for the MarkDeck project.
- Screenshots Workflow - Automated screenshot generation
- PyPI Publishing Workflow - Package distribution to PyPI
- Claude Code Integration - AI-assisted development
- Code Review Workflow - Automated code reviews
Automatically generates screenshots of the MarkDeck grid view feature using Playwright in a CI environment.
- Go to Actions tab in GitHub
- Select "Generate Grid View Screenshots" workflow
- Click "Run workflow"
- Screenshots will be:
- Generated automatically
- Uploaded as artifacts (downloadable for 90 days)
- Committed back to the repository in
screenshots/directory
The workflow runs automatically when you push changes to:
markdeck/static/**(HTML/CSS/JS changes)examples/**(Example presentation changes)
The workflow creates 6 screenshots:
- 01_normal_view.png - Normal presentation view
- 02_grid_overview.png - Grid view opened showing all slides
- 03_grid_scrolled.png - Scrolled grid view
- 04_after_navigation.png - After clicking to navigate to slide 3
- 05_grid_current_highlight.png - Grid showing current slide highlighted
- 06_grid_hover_effect.png - Hover effect demonstration
From GitHub UI:
- Go to the Actions tab
- Click on the completed workflow run
- Scroll down to Artifacts
- Download grid-view-screenshots.zip
Using GitHub CLI:
gh run download <run-id> -n grid-view-screenshotsThis workflow solves the network restriction issue because:
- ✅ GitHub Actions has full internet access
- ✅ Can download Playwright browser binaries
- ✅ Runs in a clean Ubuntu environment
- ✅ No corporate firewall restrictions
- ✅ Automated and reproducible
To test the workflow locally with act:
# Install act (GitHub Actions local runner)
brew install act # macOS
# or
sudo snap install act # Linux
# Run the workflow
act workflow_dispatch -W .github/workflows/screenshots.ymlIf the workflow fails:
-
Server not starting:
- Check MarkDeck installation succeeded
- Verify port 8888 is available
- Check server logs in workflow output
-
Screenshots not captured:
- Ensure Playwright installed correctly
- Check browser binary installation
- Verify
capture_screenshots.pyexists
-
Commit fails:
- Check repository permissions
- Ensure GITHUB_TOKEN has write access
- Verify branch protection rules
OS: Ubuntu Latest (GitHub-hosted runner) Node.js: v20 Python: 3.11 Browser: Chromium (via Playwright) Resolution: 1920x1080
GitHub Actions is free for public repositories and includes:
- 2,000 minutes/month for private repos (free tier)
- Unlimited minutes for public repos
This workflow uses approximately 2-3 minutes per run.
File: .github/workflows/publish-pypi.yml
Publishes the MarkDeck package to PyPI (Python Package Index) for distribution. This workflow is restricted to repository owners only.
This workflow only runs if:
- Repository owner is
orangewise - Repository is
orangewise/markdeck(not a fork) - Triggered manually or by creating a GitHub release
Required Secrets:
PYPI_API_TOKEN- Production PyPI API tokenTEST_PYPI_API_TOKEN- TestPyPI API token (for testing)
- Go to Actions tab in GitHub
- Select "Publish to PyPI" workflow
- Click "Run workflow"
- Choose options:
- Branch: Usually
mainor release branch - Publish to TestPyPI: Check this box to test the upload first
- Branch: Usually
- Click "Run workflow"
-
Create a new release on GitHub:
# Tag the release git tag v0.3.0 git push origin v0.3.0 -
Create release on GitHub UI:
- Go to Releases → Create new release
- Choose the tag you just created
- Write release notes
- Click "Publish release"
-
Workflow automatically publishes to PyPI
- Checkout - Get repository code
- Setup Python - Install Python 3.11
- Install uv - Install package manager
- Install build tools - Install
buildandtwine - Verify version - Extract version from
pyproject.toml - Build distribution - Create wheel (
.whl) and tarball (.tar.gz) - Check distribution - Validate package with
twine check - Verify contents - List files in wheel and tarball
- Publish - Upload to TestPyPI or PyPI
- Upload artifacts - Save build artifacts for 90 days
- Create summary - Generate release summary in workflow
Before publishing:
-
Update version in
pyproject.toml:[project] name = "markdeck" version = "0.3.1" # Update this
-
Update version in
markdeck/__init__.py:__version__ = "0.3.1"
-
Commit changes:
git add pyproject.toml markdeck/__init__.py git commit -m "Bump version to 0.3.1" git push
Before publishing to PyPI:
- All tests pass (
python -m unittest discover tests/) - Code is formatted (
ruff format markdeck/ tests/) - Linting passes (
ruff check markdeck/ tests/) - Version is updated in
pyproject.tomland__init__.py -
CHANGELOG.mdis updated (if exists) -
README.mdis up to date - Create GitHub release with release notes
# Clean previous builds
rm -rf dist/ build/ *.egg-info
# Build package
python -m build
# Check package
twine check dist/*
# Verify contents
python -m zipfile -l dist/*.whl
tar -tzf dist/*.tar.gz
# Test install locally
pip install dist/*.whl
# Or upload to TestPyPI manually
twine upload --repository testpypi dist/*Issue: "File already exists" error
- Cause: Version already published to PyPI
- Solution: Increment version number in
pyproject.toml
Issue: "Invalid API token"
- Cause:
PYPI_API_TOKENsecret not set or incorrect - Solution:
- Go to PyPI.org → Account Settings → API tokens
- Create new token with scope for
markdeckproject - Add to GitHub Secrets: Settings → Secrets → Actions → New secret
Issue: Workflow doesn't run
- Cause: Not repository owner or running on fork
- Solution: Only repository owner can trigger this workflow
Issue: Build fails
- Cause: Missing dependencies or syntax errors
- Solution:
- Check workflow logs for errors
- Run build locally first:
python -m build - Fix errors and commit
Package Name: markdeck
Install Command:
pip install markdeck
# or
uv pip install markdeckPackage URLs:
Semantic Versioning (MAJOR.MINOR.PATCH):
- MAJOR (1.0.0) - Incompatible API changes
- MINOR (0.3.0) - New features, backwards compatible
- PATCH (0.3.1) - Bug fixes, backwards compatible
Pre-release versions:
- Alpha:
0.3.0a1 - Beta:
0.3.0b1 - Release Candidate:
0.3.0rc1
This workflow is free for public repositories on GitHub Actions.
File: .github/workflows/claude.yml
Enables @claude mentions in issues and pull requests for AI-assisted development.
Triggers:
- Issue comments containing
@claude - PR review comments containing
@claude - Issues with
@claudein title/body
Required Secret:
CLAUDE_CODE_OAUTH_TOKEN
File: .github/workflows/claude-code-review.yml
Automated code review for pull requests using Claude.
See workflow file for details.