From 4ef9628276e7ae1ba604d48381456935a5aecc46 Mon Sep 17 00:00:00 2001 From: Ivan Shmidt Date: Wed, 12 Aug 2020 12:05:52 +0200 Subject: [PATCH] feat: ga-action for deploy --- .../microsite-with-storybook-deploy.yml | 17 +++--- .github/workflows/storybook-deploy.yml | 56 ------------------- 2 files changed, 10 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/storybook-deploy.yml diff --git a/.github/workflows/microsite-with-storybook-deploy.yml b/.github/workflows/microsite-with-storybook-deploy.yml index cccdeb974f..c19da75403 100644 --- a/.github/workflows/microsite-with-storybook-deploy.yml +++ b/.github/workflows/microsite-with-storybook-deploy.yml @@ -1,7 +1,9 @@ name: Deploy Microsite and Storybook on: - pull_request: + push: + branches: + - master paths: - '.github/workflows/microsite-with-storybook-deploy.yml' - 'packages/storybook/**' @@ -60,9 +62,10 @@ jobs: - name: Check the build output run: ls microsite/build/backstage && ls microsite/build/backstage/storybook - # - name: deploy storybook to gh-pages - # uses: JamesIves/github-pages-deploy-action@3.4.2 - # with: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # BRANCH: gh-pages - # FOLDER: ./microsite/build/backstage + + - name: Deploy both microsite and storybook to gh-pages + uses: JamesIves/github-pages-deploy-action@3.4.2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: ./microsite/build/backstage diff --git a/.github/workflows/storybook-deploy.yml b/.github/workflows/storybook-deploy.yml deleted file mode 100644 index 33ffba5ccd..0000000000 --- a/.github/workflows/storybook-deploy.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Deploy Storybook - -on: - push: - branches: - - master - paths: - - '.github/workflows/storybook-deploy.yml' - - 'packages/storybook/**' - - 'packages/core/src/**' - -jobs: - deploy-storybook: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x] - - env: - CI: true - NODE_OPTIONS: --max-old-space-size=4096 - - steps: - - uses: actions/checkout@v2 - - name: find location of global yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - name: cache global yarn cache - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: cache node_modules - uses: actions/cache@v2 - with: - path: node_modules - key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - - - name: use node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - registry-url: https://registry.npmjs.org/ # Needed for auth - - name: yarn install - run: yarn install --frozen-lockfile - - name: build storybook - run: yarn workspace storybook build-storybook - - name: deploy storybook to gh-pages - uses: JamesIves/github-pages-deploy-action@3.4.2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: packages/storybook/dist