Skip to content

CallumHemsley is executing cd-app #11

CallumHemsley is executing cd-app

CallumHemsley is executing cd-app #11

Workflow file for this run

name: cd-app
run-name: ${{ github.actor }} is executing cd-app
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
defaults:
run:
working-directory: front
jobs:
cd-app:
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@v2
with:
aws-region: eu-west-2
role-to-assume: arn:aws:iam::111982095069:role/github-omnilog
role-session-name: GitHubActions-CD-App
- 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_FILE }}" > .env
- name: Install dependencies
uses: borales/actions-yarn@v4
with:
cmd: --cwd front install # yarn install
- name: Deploy
uses: borales/actions-yarn@v4
with:
cmd: --cwd front sst deploy --profile omnilog --stage staging # yarn sst ...