Skip to content

Commit 6af18d5

Browse files
committed
add docs path
1 parent 08accf9 commit 6af18d5

File tree

3 files changed

+60
-6
lines changed

3 files changed

+60
-6
lines changed

.github/workflows/deploy.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ jobs:
4646
${{ runner.os }}-build-
4747
- name: Install dependencies
4848
run: npm ci
49-
- name: Static HTML export with VitePress
49+
- name: Static HTML export with VitePress - /docs (for coderbot)
5050
run: |
51+
mv ./docs/.vitepress/config.js ./docs/.vitepress/config_root.js
52+
mv ./docs/.vitepress/config_docs.js ./docs/.vitepress/config.js
5153
npm run docs:build
52-
ls -l ./docs/.vitepress/dist
5354
tar czf ./docs.tgz -C ./docs/.vitepress/dist .
5455
- name: Create Release
5556
id: create_release
@@ -61,10 +62,11 @@ jobs:
6162
release_name: ${{ github.ref_name }}
6263
draft: ${{ contains( github.ref_name, 'main') }}
6364
prerelease: false
64-
- name: Upload artifact
65-
uses: actions/upload-pages-artifact@v1
66-
with:
67-
path: ./docs/.vitepress/dist
65+
- name: Static HTML export with VitePress - / (for website)
66+
run: |
67+
mv ./docs/.vitepress/config.js ./docs/.vitepress/config_docs.js
68+
mv ./docs/.vitepress/config_root.js ./docs/.vitepress/config.js
69+
npm run docs:build
6870
- name: Upload built docs to Release
6971
uses: actions/upload-release-asset@v1
7072
env:
@@ -83,6 +85,10 @@ jobs:
8385
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8486
with:
8587
release_id: ${{ steps.publish_info.outputs.release_id }}
88+
- name: Upload artifact
89+
uses: actions/upload-pages-artifact@v1
90+
with:
91+
path: ./docs/.vitepress/dist
8692

8793
# Deployment job
8894
deploy:

docs/.vitepress/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export default {
2+
base: "/",
23
title: 'Documentazione di CoderBot',
34
description: 'Guida all\'uso di CoderBot',
45
themeConfig: {

docs/.vitepress/config_docs.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
export default {
2+
base: "/docs",
3+
title: 'Documentazione di CoderBot',
4+
description: 'Guida all\'uso di CoderBot',
5+
themeConfig: {
6+
outlineTitle: 'Su questa pagina',
7+
sidebar: [
8+
{
9+
text: 'Kit di montaggio',
10+
items: [
11+
{ text: 'Istruzioni di montaggio', link: '/kit/' },
12+
{ text: 'Elenco delle parti', link: '/description/' },
13+
]
14+
},
15+
{
16+
text: 'Manuale di configurazione',
17+
items: [
18+
{ text: 'Avvio', link: '/manual/#messa-in-funzione' },
19+
{ text: 'Ricarica della Batteria', link: '/manual/#ricarica-della-batteria' },
20+
{ text: 'Impostazioni', link: '/manual/#impostazioni' },
21+
{ text: 'Aggiornamento', link: '/manual/#aggiornamento' },
22+
{ text: 'Ripristino', link: '/manual/#ripristino-impostazioni' },
23+
]
24+
},
25+
{
26+
text: 'Manuale d\'uso',
27+
items: [
28+
{ text: 'Programmazione', link: '/usermanual/#programmazione' },
29+
{ text: 'Attività', link: '/usermanual/#attivita' },
30+
{ text: 'Blocchi', link: '/usermanual/blocks/' },
31+
{ text: 'Programmi', link: '/usermanual/programs/' },
32+
]
33+
},
34+
{
35+
text: 'Guide',
36+
items: [
37+
{ text: 'Muovere CoderBot', link: '/guides/#muovere-coderbot' },
38+
{ text: 'Programmiamo con i sensori', link: '/guides/#programmiamo-con-i-sensori' },
39+
]
40+
},
41+
]
42+
},
43+
head: [
44+
['script', {async: true, src: 'https://www.googletagmanager.com/gtag/js?id=G-JH5JX4PBZG'}],
45+
['script', {}, "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-JH5JX4PBZG');"]
46+
]
47+
}

0 commit comments

Comments
 (0)