From 63cdebd96bf13f045ac949edf7242044ecfef525 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Fri, 17 Apr 2020 09:27:11 +0900 Subject: [PATCH] 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/ --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 74d1df3..0522ee8 100644 --- a/README.md +++ b/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