Skip to content

Commit

Permalink
microsite: remove from workspace and build independently
Browse files Browse the repository at this point in the history
  • Loading branch information
Rugvip committed Sep 5, 2020
1 parent ec919f3 commit 66f5332
Show file tree
Hide file tree
Showing 11 changed files with 6,752 additions and 1,306 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ jobs:

- run: yarn tsc
- name: yarn build
run: yarn build --ignore example-app --ignore example-backend --ignore @techdocs/cli --ignore backstage-microsite
run: yarn build --ignore example-app --ignore example-backend --ignore @techdocs/cli
- name: run E2E test
run: yarn workspace e2e-test start
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- run: yarn tsc
- name: yarn build
run: yarn build --ignore example-app --ignore example-backend --ignore @techdocs/cli --ignore backstage-microsite
run: yarn build --ignore example-app --ignore example-backend --ignore @techdocs/cli
- name: run E2E test
run: |
sudo sysctl fs.inotify.max_user_watches=524288
Expand Down
28 changes: 6 additions & 22 deletions .github/workflows/microsite-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,17 @@ jobs:
steps:
- uses: actions/checkout@v2

# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
- 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: cache all node_modules
id: cache-modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
- name: find location of global yarn cache
id: yarn-cache
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: cache global yarn cache
uses: actions/cache@v2
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

# Skip caching of microsite dependencies, it keeps the global cache size
# smaller, which make Windows builds a lot faster for the rest of the project.
- name: yarn install
run: yarn install --frozen-lockfile
# End of yarn setup
working-directory: microsite

- name: build microsite
run: yarn workspace backstage-microsite build
run: yarn build
working-directory: microsite
8 changes: 7 additions & 1 deletion .github/workflows/microsite-with-storybook-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ jobs:
run: yarn install --frozen-lockfile
# End of yarn setup

# Previous install was to be able to build storybook, this is for the microsite, and we skip caching
- name: yarn install
run: yarn install --frozen-lockfile
working-directory: microsite

- name: build microsite
run: yarn workspace backstage-microsite build
run: yarn build
working-directory: microsite

- name: build storybook
run: yarn workspace storybook build-storybook
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ typings/
.nuxt
dist

# Microsite build output
microsite/build
microsite/i18n

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
Expand Down
4 changes: 4 additions & 0 deletions microsite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# Build output
build
i18n
26 changes: 25 additions & 1 deletion microsite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,36 @@ This website was created with [Docusaurus](https://docusaurus.io/).

# What's In This Document

- [Get Started in 5 Minutes](#get-started-in-5-minutes)
- [Getting Started](#getting-started)
- [Directory Structure](#directory-structure)
- [Editing Content](#editing-content)
- [Adding Content](#adding-content)
- [Full Documentation](#full-documentation)

# Getting Started

## Installation

```
$ yarn install
```

## Local Development

```
$ yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

## Build

```
$ yarn build
```

This command generates static content into the `build` directory, which is what will be deployed to GitHub pages from the master branch.

## Directory Structure

Your project file structure should look something like this
Expand Down
2 changes: 1 addition & 1 deletion microsite/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.1-alpha.21",
"version": "0.0.0",
"name": "backstage-microsite",
"license": "Apache-2.0",
"private": true,
Expand Down
Loading

0 comments on commit 66f5332

Please sign in to comment.