This repository contains reusable GitHub Actions workflows for Square360 Pantheon projects.
Deploys code to Pantheon environments with optional semantic release.
Usage:
jobs:
deploy:
uses: Square360/shared-pantheon-workflows/.github/workflows/reusable-deploy-pantheon.yml@main
with:
pantheon_site: ${{ vars.PANTHEON_SITE }}
target_env: "dev"
backup_hours_threshold: 6
run_semantic_release: true
secrets:
PANTHEON_SSH_KEY: ${{ secrets.PANTHEON_SSH_KEY }}
PANTHEON_MACHINE_TOKEN: ${{ secrets.PANTHEON_MACHINE_TOKEN }}
CI_GH_TOKEN: ${{ secrets.CI_GH_TOKEN }}Inputs:
pantheon_site(required): Pantheon site nametarget_env(optional): Target environment (default: "dev")backup_hours_threshold(optional): Hours threshold for backup check (default: 6)run_semantic_release(optional): Whether to run semantic release first (default: true)
Deploys pull requests to Pantheon multidev environments.
Usage:
jobs:
deploy:
uses: Square360/shared-pantheon-workflows/.github/workflows/reusable-deploy-multidev.yml@main
with:
pantheon_site: ${{ vars.PANTHEON_SITE }}
pr_number: ${{ github.event.pull_request.number }}
base_ref: ${{ github.base_ref }}
action: ${{ github.event.action }}
secrets:
PANTHEON_SSH_KEY: ${{ secrets.PANTHEON_SSH_KEY }}
PANTHEON_MACHINE_TOKEN: ${{ secrets.PANTHEON_MACHINE_TOKEN }}- Create a new repository named
shared-pantheon-workflowsin your organization - Copy the workflow files from this repository to
.github/workflows/ - Update your project repositories to use these shared workflows
Each project using these workflows needs these secrets configured:
PANTHEON_SSH_KEY: SSH key for Pantheon accessPANTHEON_MACHINE_TOKEN: Pantheon machine tokenCI_GH_TOKEN: GitHub token for semantic release (optional)
PANTHEON_SITE: Your Pantheon site name
These workflows use semantic-release to automatically determine version numbers and generate release notes based on commit messages.
The workflows are configured to include all commit types in release notes, organized into sections:
| Commit Type | Section in Release Notes | Triggers Version Bump |
|---|---|---|
feat |
Features | Minor (1.x.0) |
fix |
Bug Fixes | Patch (1.0.x) |
perf |
Performance Improvements | Patch (1.0.x) |
revert |
Reverts | Patch (1.0.x) |
refactor |
Code Refactoring | Minor (1.x.0) |
chore |
Chores | Patch (1.0.x) |
docs |
Documentation | No version bump |
style |
Styles | No version bump |
test |
Tests | No version bump |
build |
Build System | No version bump |
ci |
Continuous Integration | No version bump |
Follow the Conventional Commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Examples:
feat(auth): add JWT authenticationfix(api): resolve null pointer exception in user endpointchore(deps): update drupal core to 10.2.0docs(readme): update deployment instructions
To trigger a major version bump (x.0.0), add BREAKING CHANGE: in the commit footer:
feat(api): change user endpoint response format
BREAKING CHANGE: The user endpoint now returns an array instead of an object
Or use the ! notation:
feat!: change API response format
We recommend pinning to specific versions for production use:
uses: Square360/shared-pantheon-workflows/.github/workflows/reusable-deploy-pantheon.yml@v1.0.0For development, you can use the latest version:
uses: Square360/shared-pantheon-workflows/.github/workflows/reusable-deploy-pantheon.yml@mainWhen updating workflows:
- Test changes in a development branch
- Create a pull request for review
- Tag releases for version management
- Update documentation as needed
For questions or issues with these workflows, please create an issue in this repository.