mirror of
https://github.com/status-im/actions-gh-pages.git
synced 2025-02-24 02:38:06 +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.
|
||||
|
||||
```yaml
|
||||
# .github/workflows/deploy.yml
|
||||
|
||||
name: github pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/workflows/deploy.yml'
|
||||
- 'website/**'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: website
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@ -711,9 +720,7 @@ jobs:
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- run: yarn install
|
||||
working-directory: ./website
|
||||
- run: yarn build
|
||||
working-directory: ./website
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
|
Loading…
x
Reference in New Issue
Block a user