Skip to content

Commit

Permalink
add GitHub Action for publishing Storybook to GitHub Pages (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 authored Nov 21, 2022
1 parent ca0c1af commit ab23b38
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy GitHub Pages

on:
push:
branches:
- main

jobs:

build-and-deploy:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x

- name: Install Dependencies
run: |
yarn install --frozen-lockfile
- name: Build
run: |
yarn clean && yarn story:build
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ See _package.json_ for all options:
- `yarn test:tdd` - Run tests in watch mode
- `yarn story:dev` - Run Storybook for development

> _Hosted Storybook docs available through [GitHub Pages](http://analogstudiosri.github.io/www.tuesdaystunes.tv)_
## Release Management

The project is hosted by [Netlify](https://www.netlify.com/) and is setup to deploy continuously on every merge to the mainline branch in GitHub. [GitHub Actions](https://github.com/features/actions) are used for continuous integration on PRs and Netlify will deploy preview builds for all PRs.

0 comments on commit ab23b38

Please sign in to comment.