-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from US-CBP/feature/minor-updates-20210329
Feature/minor updates 20210329
- Loading branch information
Showing
19 changed files
with
19,515 additions
and
556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,37 @@ | ||
name: Deploy Github Pages | ||
run-name: ${{ github.actor }} is deploying the design system to Github Pages | ||
on: | ||
workflow_dispatch: | ||
# Workflow name | ||
name: Build and Publish Storybook to GitHub Pages | ||
run-name: ${{ github.actor }} is deploying the CBP Design System documentation packages to Github Pages | ||
|
||
# Event for the workflow to run on | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- 'develop' | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
contents: read | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
jobs: | ||
build: | ||
name: build static content | ||
timeout-minutes: 15 | ||
# List of jobs | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
# Job steps | ||
steps: | ||
# Manual Checkout | ||
- uses: actions/checkout@v3 | ||
|
||
# Set up Node | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
cache: npm | ||
- run: npm ci # runs clean-install | ||
- run: npm run build-pages # build all static sites in all packages | ||
|
||
- name: Archive artifact | ||
shell: sh | ||
if: runner.os == 'Linux' | ||
run: | | ||
tar \ | ||
--dereference --hard-dereference \ | ||
--directory ".public" \ | ||
-cvf "$RUNNER_TEMP/artifact.tar" \ | ||
--exclude=.git \ | ||
--exclude=.github \ | ||
. | ||
node-version: '18.x' | ||
|
||
- uses: actions/upload-artifact@v3 | ||
#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow | ||
- uses: bitovi/[email protected] | ||
with: | ||
name: github-pages | ||
path: ${{ runner.temp }}/artifact.tar | ||
retention-days: "1" | ||
if-no-files-found: error | ||
|
||
deploy: | ||
needs: build | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# Specify runner + deployment step | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
install_command: npm ci # default: npm ci | ||
build_command: npm run build-pages # default: npm run build-storybook | ||
path: .public # default: dist/storybook | ||
checkout: false # default: true |
Oops, something went wrong.