diff --git a/.github/workflows/microsite-build-check.yml b/.github/workflows/microsite-build-check.yml new file mode 100644 index 0000000000..41f43399ca --- /dev/null +++ b/.github/workflows/microsite-build-check.yml @@ -0,0 +1,52 @@ +name: Build microsite + +on: + pull_request: + paths: + - '.github/workflows/microsite-build-check.yml' + - 'microsite/**' + - 'docs/**' + +jobs: + build-microsite: + 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 diff --git a/.github/workflows/microsite-with-storybook-deploy.yml b/.github/workflows/microsite-with-storybook-deploy.yml index c19da75403..13ad3d7a26 100644 --- a/.github/workflows/microsite-with-storybook-deploy.yml +++ b/.github/workflows/microsite-with-storybook-deploy.yml @@ -11,7 +11,7 @@ on: - 'microsite/**' jobs: - deploy-storybook: + deploy-microsite-and-storybook: runs-on: ubuntu-latest strategy: