From 9293abcb79dcdc7f4d7c1e6af8c9826340bc22d4 Mon Sep 17 00:00:00 2001 From: Cezar Pauxis Date: Fri, 26 Jan 2024 12:14:52 -0300 Subject: [PATCH] ci: set working-directory on defaults --- .github/workflows/deploy.yml | 7 ++++--- .github/workflows/test-deploy.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da9e7bc..042fc7a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 0d747b4..d80ca53 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -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: @@ -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 }} \ No newline at end of file + run: yarn build \ No newline at end of file