Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Improve Docusaurus example #191

Merged
merged 1 commit into from
Mar 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,9 @@ jobs:

### ⭐️ Docusaurus

An example for pages created using [Docusaurus](https://docusaurus.io/).
An example workflow for [Docusaurus](https://docusaurus.io/).

Examples where this is being used:

- [Mittens](https://github.com/ExpediaGroup/mittens)
- [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin)
`npx @docusaurus/init@next init` is useful to create a new Docusaurus project.

```yaml
name: github pages
Expand All @@ -671,9 +668,6 @@ on:
push:
branches:
- master
paths:
- 'docs/**'
- 'website/**'

jobs:
deploy:
Expand All @@ -684,28 +678,28 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
node-version: '12.x'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('website/package-lock.json') }}
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-yarn-

- name: Build
run: |
cd website
npm ci
npm run build
- run: yarn install
- run: yarn build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# use the projectName from your siteConfig.js file: https://docusaurus.io/docs/en/site-config#projectname-string
publish_dir: ./website/build/<projectName>
publish_dir: ./build
```

### ⭐️ Static Site Generators with Python
Expand Down