Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr branch 2 #10

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Storybook
on:
workflow_call:
inputs:
pr-number:
required: false
type: string
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
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"
pr: ${{ inputs.pr-number }}
run: GH_PAGES=true PR=$pr 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: Archive Storybook Assets
uses: actions/upload-artifact@v4
with:
name: dist-without-markdown
path: storybook-static
retention-days: 1
25 changes: 11 additions & 14 deletions .github/workflows/pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,25 @@ on:

concurrency: preview-${{ github.ref }}
jobs:
Build-And-Deploy:
Build:
uses: ./.github/workflows/build.yml
with:
pr-number: ${{ github.event.number }}
Build-And-Deploy-PR-Branch:
runs-on: ubuntu-latest
needs: Build
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"
pr: ${{ github.event.number }}
run: GH_PAGES=true PR=$pr 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: Download Storybook Assets
uses: actions/download-artifact@v4
with:
name: dist-without-markdown
path: ./storybook-static
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<p>Actions component provides a compact trigger for a menu of options.</p>

<p>Test</p>
<p>Test - PR Branch #3</p>
Loading