feat: microsite deploy gh-action

Co-authored-by: Raghunandan Balachandran <meetraghu28@gmail.com>
This commit is contained in:
Ivan Shmidt
2020-08-12 11:08:04 +02:00
parent 45ba08a1d5
commit 6db2d91a01
3 changed files with 1655 additions and 57 deletions
@@ -0,0 +1,70 @@
name: Deploy Microsite and Storybook
on:
pull-request:
branches:
- master
paths:
- '.github/workflows/microsite-with-storybook-deploy.yml'
- 'packages/storybook/**'
- 'packages/core/src/**'
- 'microsite/**'
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 microsite
run: yarn workspace backstage-microsite build
- name: build storybook
run: yarn workspace storybook build-storybook
- name: move storybook dist into microsite
run: mv packages/storybook/dist/ microsite/build/backstage/storybook
- 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
+2 -1
View File
@@ -30,7 +30,8 @@
"workspaces": {
"packages": [
"packages/*",
"plugins/*"
"plugins/*",
"microsite"
]
},
"version": "1.0.0",
+1583 -56
View File
File diff suppressed because it is too large Load Diff