Deploy to Aptible Staging #700
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Aptible Staging | |
on: | |
workflow_run: | |
workflows: [ "Run tests" ] | |
types: [ completed ] | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: { } | |
jobs: | |
deploy: | |
name: Deploy to Aptible Staging | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
fetch-depth: 0 | |
- name: Deploy to Aptible | |
uses: aptible/aptible-deploy-action@v4 | |
with: | |
type: git | |
app: illinois-get-childcare-staging | |
environment: illinois-staging | |
username: ${{ secrets.APTIBLE_USERNAME }} | |
password: ${{ secrets.APTIBLE_PASSWORD }} | |
# Looking for secrets/variables for the application? Check the configuration tab in the Aptible app GUI | |
- name: Generate Sentry release name from sha | |
id: generate-release | |
run: echo "::set-output name=RELEASE::$(git rev-parse HEAD)" | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: codeforamerica | |
SENTRY_PROJECT: il-gcc | |
with: | |
environment: staging | |
- name: Announce on Slack when deployed | |
uses: ravsamhq/notify-slack-action@v2 | |
with: | |
status: ${{ job.status }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |