Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: docs
path: src-staging
- name: Move docs
run: |
shopt -s dotglob
mv src-staging/docs/* .
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: docs/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn --cwd docs install --frozen-lockfile
- name: Test build website
run: yarn build
run: yarn --cwd docs build

deploy-precheck:
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -59,18 +52,11 @@ jobs:
environment: docs-release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: docs
path: src-staging
- name: Move docs
run: |
shopt -s dotglob
mv src-staging/docs/* .
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: docs/yarn.lock
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
Expand All @@ -82,5 +68,7 @@ jobs:
export COCOINDEX_DOCS_MIXPANEL_API_KEY=${{ vars.COCOINDEX_DOCS_MIXPANEL_API_KEY }}
export COCOINDEX_DOCS_ALGOLIA_APP_ID=${{ vars.COCOINDEX_DOCS_ALGOLIA_APP_ID }}
export COCOINDEX_DOCS_ALGOLIA_API_KEY=${{ vars.COCOINDEX_DOCS_ALGOLIA_API_KEY }}
yarn install --frozen-lockfile
yarn deploy
git config --global user.email "${{ vars.COCOINDEX_DOCS_DEPLOY_USER_EMAIL }}"
git config --global user.name "${{ vars.COCOINDEX_DOCS_DEPLOY_USER_NAME }}"
yarn --cwd docs install --frozen-lockfile
yarn --cwd docs deploy
Loading