Skip to content

Refactor Cohort Loading #2081

Refactor Cohort Loading

Refactor Cohort Loading #2081

Workflow file for this run

name: Deploy Pull Request
on:
pull_request_target:
types: [labeled]
env:
COVERAGE: false
jobs:
deploy:
name: Deploy PR Preview
runs-on: ubuntu-latest
timeout-minutes: 60
if: contains(github.event.pull_request.labels.*.name, 'safe to deploy')
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install
- name: Ember CLI Deploy
timeout-minutes: 30
run: pnpm --filter frontend exec ember deploy pr-preview
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
- uses: act10ns/slack@v2
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }}
with:
status: ${{ job.status }}
message: PR ${{ github.event.number }} Deploy Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}
comment:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Staging build deployed! It can be accessed with `bin/console ilios:update-frontend --staging-build --at-version=pr_preview-${{ github.event.number }}`"
})