This directory contains GitHub Actions workflow files for the AudioStretchy project.
Trigger:
- Push to
main
branch (whensrc_docs/
changes) - Pull requests to
main
branch (whensrc_docs/
changes) - Manual workflow dispatch
Purpose:
- Builds MkDocs Material documentation from
src_docs/
- Deploys to GitHub Pages on push to main
- Validates documentation builds on pull requests
Requirements:
- GitHub Pages must be enabled in repository settings
- Source set to "GitHub Actions" in Pages settings
Trigger:
- Push to
main
ordevelop
branches - Pull requests to
main
ordevelop
branches - Manual workflow dispatch
Purpose:
- Tests on multiple OS (Ubuntu, Windows, macOS)
- Tests multiple Python versions (3.8 - 3.12)
- Runs linting with flake8
- Runs tests with pytest and coverage
- Builds distribution packages
Trigger:
- Push of version tags (e.g.,
v1.2.3
)
Purpose:
- Runs full test suite on release
- Builds distribution packages for all platforms
- Creates GitHub release with artifacts
- Publishes to PyPI automatically
Requirements:
PYPI_API_TOKEN
secret must be configured- Release environment may need approval settings
To activate these workflows:
-
Copy to
.github/
directory:cp -r _github/ .github/
-
Configure GitHub Pages:
- Go to repository Settings → Pages
- Set Source to "GitHub Actions"
- The documentation will be available at
https://username.github.io/audiostretchy/
-
Configure PyPI Publishing:
- Create PyPI API token at https://pypi.org/manage/account/token/
- Add token as
PYPI_API_TOKEN
secret in repository settings - Optionally configure release environment with approval requirements
-
Test Workflows:
- Create a pull request to test CI
- Push to main to test documentation build
- Create a tag like
v1.0.0-test
to test release workflow
Edit workflows/docs.yml
to customize:
- Trigger conditions: Modify
on.push.paths
to change which files trigger builds - Python version: Change in
setup-python
step - Additional dependencies: Add to pip install step
- Build directory: Modify
mkdocs build
command and upload path
Edit workflows/ci.yml
to customize:
- OS matrix: Add/remove operating systems
- Python versions: Modify version matrix
- Test commands: Change pytest configuration
- Linting rules: Modify flake8 parameters
Edit workflows/release.yml
to customize:
- Tag pattern: Change
tags
filter - Release notes: Modify
generate_release_notes
setting - PyPI repository: Add
repository-url
for test PyPI
- Secrets: Never commit API tokens or sensitive data
- Permissions: Use minimal required permissions in workflows
- Environment protection: Consider requiring reviews for release environment
- Token scoping: Use scoped tokens with minimal required permissions
- Check MkDocs configuration in
src_docs/mkdocs.yml
- Verify all referenced files exist
- Check Python package dependencies
- Review workflow logs for specific errors
- Check test failures in pytest output
- Verify system dependencies are installed
- Check Python version compatibility
- Review linting errors from flake8
- Verify PyPI token is configured correctly
- Check package version conflicts
- Ensure all tests pass before release
- Review build artifact generation
For more information, see the GitHub Actions documentation.