Skip to content

Commit

Permalink
Merge pull request #21 from codesyntax/develop
Browse files Browse the repository at this point in the history
Github actions CI
  • Loading branch information
bipoza authored May 18, 2022
2 parents a1325c5 + 5410352 commit 3539233
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Release a new version

on:
pull_request:
branches:
Expand All @@ -21,9 +23,6 @@ jobs:
- run: npm install release-it
- run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > .npmrc
- run: npm run release -- minor --ci
# Deploy storybook to Github pages
# - name: Deploy Storybook
# - run: npm run deploy-storybook
env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN}}
30 changes: 6 additions & 24 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
name: Build
name: Build & Deploy Storybook
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
Expand All @@ -25,28 +25,10 @@ jobs:

- name: Build project
run: npm run build-storybook

- name: Upload production-ready build files
uses: actions/upload-artifact@v2
with:
name: production-files
path: ./storybook-static

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: production-files
path: ./storybook-static

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static

0 comments on commit 3539233

Please sign in to comment.