mirror of
https://github.com/status-im/actions-gh-pages.git
synced 2025-02-24 10:48:10 +00:00
docs: Enhance Docusaurus example workflow (#234)
- Add on.push.paths - Add defaults.run.working-directory - https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun - https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/
This commit is contained in:
parent
4f693f0ddb
commit
63cdebd96b
11
README.md
11
README.md
@ -680,12 +680,21 @@ An example workflow for [Docusaurus](https://docusaurus.io/).
|
|||||||
`npx @docusaurus/init@next init website classic` is useful to create a new Docusaurus project.
|
`npx @docusaurus/init@next init website classic` is useful to create a new Docusaurus project.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# .github/workflows/deploy.yml
|
||||||
|
|
||||||
name: github pages
|
name: github pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/deploy.yml'
|
||||||
|
- 'website/**'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: website
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -711,9 +720,7 @@ jobs:
|
|||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- run: yarn install
|
- run: yarn install
|
||||||
working-directory: ./website
|
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
working-directory: ./website
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user