Skip to content

clairesquires is executing app-cd on push at e3e1af8337350e4b475427cd38ee07ac5e10fc55 #53

clairesquires is executing app-cd on push at e3e1af8337350e4b475427cd38ee07ac5e10fc55

clairesquires is executing app-cd on push at e3e1af8337350e4b475427cd38ee07ac5e10fc55 #53

Workflow file for this run

name: app-cd
run-name: ${{ github.actor }} is executing ${{ github.workflow }} on ${{ github.event_name }} at ${{ github.sha }}
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
# run on merge since you cannot push to main directly
on:
push:
branches:
- main
paths:
- front/**
defaults:
run:
working-directory: front
jobs:
app-cd:
runs-on: ubuntu-latest
steps:
# Followed https://github.com/aws-actions/configure-aws-credentials
# Set up GitHub OIDC using https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::111982095069:role/github-omnilog
role-session-name: GitHubActions-App-CD
- name: Checkout main
uses: actions/checkout@v3
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Create env file
run: |
pwd
echo "${{ secrets.FRONT_ENV_PRODUCTION }}" > .env.production
- name: Deploy
uses: borales/actions-yarn@v4
with:
cmd: --cwd front deploy --githubactions # yarn deploy --githubactions
- name: Notify slack if any of the previous steps have failed
if: ${{ failure() }}
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
payload: |
{
"message": "CD has failed",
"runUrl": "https://github.com/Theodo-UK/OmniLog/actions/runs/${{ github.run_id }}"
}