Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 docs #32

Merged
merged 13 commits into from
Mar 28, 2024
69 changes: 48 additions & 21 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,67 @@
name: Docs
name: Unified Deploy Docs

on:
push:
branches:
- main
- v3

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build_docs:
name: Build and deploy Docs
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: write
id-token: write
pages: write
steps:
- uses: actions/checkout@v3
- name: Build
working-directory: docs
- name: Checkout v3 branch
uses: actions/checkout@v4
with:
ref: "v3"
path: "v3"

- name: Build v3 docs
run: |
cd v3/docs
sed -i'.bak' "s|base:.*|base: '/v3/',|" docs/.vuepress/config.ts
sed -i 's|text: "vx.x"|text: "v3.x"|' docs/.vuepress/config.ts
npm ci
npm run build
mv ./docs/.vuepress/dist ../../v3-docs

- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: "main"
path: "main"

- name: Build main docs
run: |
npm install
cd main/docs
sed -i'.bak' "s|base:.*|base: '/',|" docs/.vuepress/config.ts
sed -i 's|text: "vx.x"|text: "v4.x"|' docs/.vuepress/config.ts
npm ci
npm run build
touch docs/.vuepress/dist/.nojekyll
mv ./docs/.vuepress/dist ../../main-docs

- name: Prepare deployment directory
run: |
mkdir deploy
mv main-docs/* deploy/
mkdir deploy/v3
mv v3-docs/* deploy/v3/

- name: Setup Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: docs/docs/.vuepress/dist
path: deploy

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
14 changes: 7 additions & 7 deletions docs/docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export default defineUserConfig({
base: '/v3/',
theme: defaultTheme({
logo: "/isar.svg",
repo: "isar/isar",
docsRepo: "isar/isar",
repo: "isar-community/isar",
docsRepo: "isar-community/isar",
docsDir: "docs/docs",
contributors: true,
locales: themeLocales,
Expand All @@ -65,11 +65,11 @@ export default defineUserConfig({
link: "https://t.me/isardb",
},
{
text: "3.x",
text: "vx.x",
children: [
{
text: "v4.x",
link: "https://isar-community.dev/",
link: "https://isar-community.dev",
},
{
text: "v3.x",
Expand Down Expand Up @@ -133,7 +133,7 @@ export default defineUserConfig({
"script",
{
async: "",
src: "https://www.googletagmanager.com/gtag/js?id=G-NX9QJRWFGX",
src: "https://www.googletagmanager.com/gtag/js?id=G-36LNDL9RHB",
},
],
[
Expand All @@ -142,7 +142,7 @@ export default defineUserConfig({
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-NX9QJRWFGX');`,
gtag('config', 'G-36LNDL9RHB');`,
],
[
"script",
Expand All @@ -151,7 +151,7 @@ export default defineUserConfig({
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "ciawnmxjdh");`,
})(window, document, "clarity", "script", "lkyzg3xacc");`,
],
],
})
Expand Down
2 changes: 2 additions & 0 deletions packages/isar/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ environment:

dependencies:
ffi: ">=2.0.0 <3.0.0"
isar_test:
path: ../isar_test
js: ^0.6.4
meta: ^1.7.0

Expand Down
Loading