Skip to content

Add PR workflow

Add PR workflow #13

Workflow file for this run

name: Deploy PRs
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
Build-HTML:
if: github.event.action != 'closed'
uses: ./.github/workflows/build.yml
with:
ng-base-href: ${{ format('{0}{1}{2}', '/sam-design-system-site/', inputs.pr-number, '//' }}

Check failure on line 14 in .github/workflows/pr.yml

View workflow run for this annotation

GitHub Actions / Deploy PRs

Invalid workflow file

The workflow is not valid. .github/workflows/pr.yml (Line: 14, Col: 23): Unexpected end of expression: ''//''. Located at position 67 within expression: format('{0}{1}{2}', '/sam-design-system-site/', inputs.pr-number, '//'
Deploy-HTML:
runs-on: ubuntu-latest
if: ${{ !failure() }}
needs: Build-HTML
steps:
# Only needed because rossjrw/pr-preview-action needs to run in a git repo
- name: Check out repository code
uses: actions/checkout@v4
- name: Download HTML Assets
# If closing PR, build will not occur so nothing to download
if: github.event.action != 'closed'
uses: actions/download-artifact@v4
with:
name: html-assets
path: ./docs
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./docs/