Skip to content

Commit

Permalink
ci: set working-directory on defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
usernein committed Jan 26, 2024
1 parent fbebe08 commit 9293abc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
runs-on: ubuntu-latest
env:
working-dir: ./docs
defaults:
run:
working-directory: ${{ env.working-dir }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -27,10 +30,8 @@ jobs:

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ${{ env.working-dir }}
- name: Build website
run: yarn build
working-directory: ${{ env.working-dir }}

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
Expand All @@ -39,7 +40,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
runs-on: ubuntu-latest
env:
working-dir: ./docs
defaults:
run:
working-directory: ${{ env.working-dir }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -24,7 +27,5 @@ jobs:

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ${{ env.working-dir }}
- name: Test build website
run: yarn build
working-directory: ${{ env.working-dir }}
run: yarn build

0 comments on commit 9293abc

Please sign in to comment.