Skip to content

Commit

Permalink
Create pr-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cwolf10 committed Jan 18, 2024
1 parent c773465 commit a4e44d3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/pr-workflow.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
branch: gh-pages
folder: storybook-static
clean-exclude: pr-preview/
force: false

0 comments on commit a4e44d3

Please sign in to comment.