| Name | Required | Type | Default | Description |
|---|---|---|---|---|
| environment | β | string | The GitHub environment to run in | |
| command | β | string | build | Command to run during the deploy step |
| package-manager | β | string | yarn | Node package manager to use |
| build-command | β | string | build | Command to override the build command |
| debug | β | boolean | false | If verbose logging should be enabled |
| create-backport-pr | β | boolean | false | Create a backport PR after deployment |
| backport-target-branch | β | string | staging | Target branch for backport PR |
These should be configured in your GitHub Environment (or at the repository level if not using environments).
| Name | Required | Type | Description |
|---|---|---|---|
STAGE |
β | Variable | The Stage name to deploy |
AWS_ACCESS_KEY_ID |
β | Variable | AWS Access Key ID for authentication |
AWS_SECRET_ACCESS_KEY |
β | Secret | AWS Secret Access Key for authentication |
CFN_ROLE |
β | Secret | CloudFormation role ARN to assume |
AWS_REGION |
β | Variable | AWS Region to deploy to (defaults to ap-southeast-2) |
Note: Backporting only occurs when deploying from production, main, or master branches. Deployments from other branches are skipped.
Note: If calling this workflow from an external GitHub organisation, you will need to pass the AWS_SECRET_ACCESS_KEY explicitly (see example below).
jobs:
deploy-serverless:
uses: aligent/workflows/.github/workflows/nx-serverless-deployment.yml@main
with:
environment: development
debug: truename: π Deploy
on:
push:
branches:
- staging
- production
jobs:
deploy:
uses: aligent/workflows/.github/workflows/nx-serverless-deployment.yml@main
with:
environment: ${{ github.ref_name == 'production' && 'Production' || 'Staging' }}
package-manager: npmname: π Deploy
on:
push:
branches:
- staging
- production
jobs:
deploy:
uses: aligent/workflows/.github/workflows/nx-serverless-deployment.yml@main
with:
environment: ${{ github.ref_name == 'production' && 'Production' || 'Staging' }}
package-manager: npm
secrets:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}