Extend command and note for node prerequisite (skip deploy) #327
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: Push | ||
on: | ||
push: | ||
branches: [develop] | ||
env: | ||
PROJECT: casimir | ||
STAGE: dev | ||
AWS_REGION: us-east-2 | ||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
# Skip any pushes with commit flag "(skip deploy)" | ||
# Comment out for testing | ||
if: ${{ !contains(github.event.head_commit.message, "(skip deploy)") }} | ||
Check failure on line 18 in .github/workflows/push.yml GitHub Actions / PushInvalid workflow file
|
||
steps: | ||
- name: Checkout the repo with submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
- name: Setup Node.js LTS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
- name: Install action dependencies | ||
run: | | ||
curl -sSf https://atlasgo.sh | sh | ||
- name: Install and build all package dependencies | ||
run: npm ci | ||
- name: Deploy cdk infrastructure | ||
run: npm run deploy:cdk | ||
- name: Migrate users database | ||
run: npm run migrations:users | ||
- name: Slack the team | ||
if: ${{ success() || failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "<https://dev.casimir.co | *:ocean: Casimir (Dev)*> deployment finished with <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | _${{ job.status }}_>" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |