name: Deploy Pull Request

on:
  pull_request:

env:
  COVERAGE: false

jobs:
  deploy:
    name: Deploy PR Preview
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 16
      uses: actions/setup-node@v2
      with:
        node-version: 16
        cache: 'npm'
    - name: install dependencies
      run: npm ci
    - name: Ember CLI Deploy
      run: node_modules/.bin/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 }}
  comment:
    runs-on: ubuntu-latest
    needs: deploy
    steps:
      - uses: actions/github-script@v5
        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 can be accessed with ilios:update-frontend --staging-build pr_preview-${{ github.event.number }}"
            })
name: Deploy Pull Request

on:
  pull_request:

env:
  COVERAGE: false

jobs:
  deploy:
    name: Deploy PR Preview
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 16
      uses: actions/setup-node@v2
      with:
        node-version: 16
        cache: 'npm'
    - name: install dependencies
      run: npm ci
    - name: Ember CLI Deploy
      run: node_modules/.bin/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 }}
  comment:
    runs-on: ubuntu-latest
    needs: deploy
    steps:
      - uses: actions/github-script@v5
        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 can be accessed with `bin/console ilios:update-frontend --staging-build --at-version=pr_preview-${{ github.event.number }}`"
            })
Correct and Improve deploy preview comment
Correct and Improve deploy preview comment
