diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 2842442bf9..3769d329a1 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -3,6 +3,8 @@ name: Frontend CI on: pull_request: types: [opened, reopened, edited, synchronize] + push: + branches: master jobs: build: @@ -40,3 +42,25 @@ jobs: yarn test env: CI: true + + jobs: + deoloy-storybook: + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + steps: + - uses: actions/checkout@v2 + - name: build storybook + if: github.event_name === 'push' && github.ref == 'refs/heads/master' + run: | + yarn build-storybook + - name: deploy gh-pages + if: github.event_name === 'push' && github.ref == 'refs/heads/master' + uses: JamesIves/github-pages-deploy-action@3.4.2 + with: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BRANCH: gh-pages + FOLDER: packages/core/storybook-static