Skip to content

Commit 61af5ed

Browse files
committed
update ci to deploy on pages
Signed-off-by: Arshdeep54 <balarsh535@gmail.com>
1 parent 6d33a75 commit 61af5ed

1 file changed

Lines changed: 22 additions & 6 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ name: Deploy Docs
33
on:
44
push:
55
branches:
6-
- main
6+
- refactor
7+
paths:
8+
- 'docs/**'
9+
pull_request:
10+
branches:
11+
- refactor
712
paths:
813
- 'docs/**'
914
workflow_dispatch:
@@ -33,22 +38,33 @@ jobs:
3338
- name: Install Mintlify CLI
3439
run: npm install -g mintlify
3540

36-
- name: Build Docs
41+
- name: Export Docs
3742
working-directory: docs
38-
run: mintlify build
43+
run: mintlify export
44+
45+
- name: Unzip Export
46+
working-directory: docs
47+
run: unzip export.zip -d site
48+
49+
- name: Add SPA fallback
50+
run: |
51+
cp docs/site/index.html docs/site/404.html
3952
4053
- name: Upload artifact
4154
uses: actions/upload-pages-artifact@v3
4255
with:
43-
path: docs/.mintlify/
56+
path: docs/site
4457

4558
deploy:
4659
name: Deploy to GitHub Pages
60+
if: github.event_name == 'push'
61+
needs: build
62+
runs-on: ubuntu-latest
63+
4764
environment:
4865
name: github-pages
4966
url: ${{ steps.deployment.outputs.page_url }}
50-
runs-on: ubuntu-latest
51-
needs: build
67+
5268
steps:
5369
- name: Deploy to GitHub Pages
5470
id: deployment

0 commit comments

Comments
 (0)