From a4e44d3024495fdc5b46fff5bf0aa8b6d657e5ef Mon Sep 17 00:00:00 2001 From: cwolf10 <72805180+cwolf10@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:17:22 -0500 Subject: [PATCH] Create pr-workflow.yml --- .github/workflows/pr-workflow.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/pr-workflow.yml diff --git a/.github/workflows/pr-workflow.yml b/.github/workflows/pr-workflow.yml new file mode 100644 index 0000000000..ca65f4f6c7 --- /dev/null +++ b/.github/workflows/pr-workflow.yml @@ -0,0 +1,43 @@ +name: Build PR And Deploy +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} +jobs: + Build-And-Deploy: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: '16.x' + - name: Install Node Packages + run: npm i + - name: Install Global NG CLI + run: npm install -g @angular/cli@16 + - name: Build Stackblitz HTMLs + run: npm run demo:stackblitzes + - name: Build Storybook Assets + env: + NODE_OPTIONS: "--max_old_space_size=4096" + run: GH_PAGES=true ng run sam-design-system-site:build-storybook + - name: Add .nojekyll file to allow for node_modules to be included in bundle + run: touch storybook-static/.nojekyll + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./storybook-static/ + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4.3.0 + with: + branch: gh-pages + folder: storybook-static + clean-exclude: pr-preview/ + force: false