Skip to content

Commit 0a3fdd3

Browse files
authored
workflow(docs): another try to fix docs deployment (#569)
1 parent ede2b4a commit 0a3fdd3

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/docs.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,15 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
sparse-checkout: docs
28-
path: src-staging
29-
- name: Move docs
30-
run: |
31-
shopt -s dotglob
32-
mv src-staging/docs/* .
3325
- uses: actions/setup-node@v4
3426
with:
3527
node-version: 18
3628
cache: yarn
29+
cache-dependency-path: docs/yarn.lock
3730
- name: Install dependencies
38-
run: yarn install --frozen-lockfile
31+
run: yarn --cwd docs install --frozen-lockfile
3932
- name: Test build website
40-
run: yarn build
33+
run: yarn --cwd docs build
4134

4235
deploy-precheck:
4336
if: ${{ github.event_name != 'pull_request' }}
@@ -59,18 +52,11 @@ jobs:
5952
environment: docs-release
6053
steps:
6154
- uses: actions/checkout@v4
62-
with:
63-
fetch-depth: 0
64-
sparse-checkout: docs
65-
path: src-staging
66-
- name: Move docs
67-
run: |
68-
shopt -s dotglob
69-
mv src-staging/docs/* .
7055
- uses: actions/setup-node@v4
7156
with:
7257
node-version: 18
7358
cache: yarn
59+
cache-dependency-path: docs/yarn.lock
7460
- uses: webfactory/[email protected]
7561
with:
7662
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
@@ -82,5 +68,7 @@ jobs:
8268
export COCOINDEX_DOCS_MIXPANEL_API_KEY=${{ vars.COCOINDEX_DOCS_MIXPANEL_API_KEY }}
8369
export COCOINDEX_DOCS_ALGOLIA_APP_ID=${{ vars.COCOINDEX_DOCS_ALGOLIA_APP_ID }}
8470
export COCOINDEX_DOCS_ALGOLIA_API_KEY=${{ vars.COCOINDEX_DOCS_ALGOLIA_API_KEY }}
85-
yarn install --frozen-lockfile
86-
yarn deploy
71+
git config --global user.email "${{ vars.COCOINDEX_DOCS_DEPLOY_USER_EMAIL }}"
72+
git config --global user.name "${{ vars.COCOINDEX_DOCS_DEPLOY_USER_NAME }}"
73+
yarn --cwd docs install --frozen-lockfile
74+
yarn --cwd docs deploy

0 commit comments

Comments
 (0)