docs: Improve Docusaurus example (#191)
This commit is contained in:
parent
87399813a5
commit
014420965c
32
README.md
32
README.md
|
@ -657,12 +657,9 @@ jobs:
|
||||||
|
|
||||||
### ⭐️ Docusaurus
|
### ⭐️ 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:
|
`npx @docusaurus/init@next init` is useful to create a new Docusaurus project.
|
||||||
|
|
||||||
- [Mittens](https://github.com/ExpediaGroup/mittens)
|
|
||||||
- [graphql-kotlin](https://github.com/ExpediaGroup/graphql-kotlin)
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: github pages
|
name: github pages
|
||||||
|
@ -671,9 +668,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
|
||||||
- 'docs/**'
|
|
||||||
- 'website/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -684,28 +678,28 @@ jobs:
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
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
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('website/package-lock.json') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Build
|
- run: yarn install
|
||||||
run: |
|
- run: yarn build
|
||||||
cd website
|
|
||||||
npm ci
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# use the projectName from your siteConfig.js file: https://docusaurus.io/docs/en/site-config#projectname-string
|
publish_dir: ./build
|
||||||
publish_dir: ./website/build/<projectName>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### ⭐️ Static Site Generators with Python
|
### ⭐️ Static Site Generators with Python
|
||||||
|
|
Loading…
Reference in New Issue