Skip to content

Commit

Permalink
add docs path
Browse files Browse the repository at this point in the history
  • Loading branch information
previ committed Feb 26, 2023
1 parent 08accf9 commit 6af18d5
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ jobs:
${{ runner.os }}-build-
- name: Install dependencies
run: npm ci
- name: Static HTML export with VitePress
- name: Static HTML export with VitePress - /docs (for coderbot)
run: |
mv ./docs/.vitepress/config.js ./docs/.vitepress/config_root.js
mv ./docs/.vitepress/config_docs.js ./docs/.vitepress/config.js
npm run docs:build
ls -l ./docs/.vitepress/dist
tar czf ./docs.tgz -C ./docs/.vitepress/dist .
- name: Create Release
id: create_release
Expand All @@ -61,10 +62,11 @@ jobs:
release_name: ${{ github.ref_name }}
draft: ${{ contains( github.ref_name, 'main') }}
prerelease: false
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/.vitepress/dist
- name: Static HTML export with VitePress - / (for website)
run: |
mv ./docs/.vitepress/config.js ./docs/.vitepress/config_docs.js
mv ./docs/.vitepress/config_root.js ./docs/.vitepress/config.js
npm run docs:build
- name: Upload built docs to Release
uses: actions/upload-release-asset@v1
env:
Expand All @@ -83,6 +85,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.publish_info.outputs.release_id }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/.vitepress/dist

# Deployment job
deploy:
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
base: "/",
title: 'Documentazione di CoderBot',
description: 'Guida all\'uso di CoderBot',
themeConfig: {
Expand Down
47 changes: 47 additions & 0 deletions docs/.vitepress/config_docs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export default {
base: "/docs",
title: 'Documentazione di CoderBot',
description: 'Guida all\'uso di CoderBot',
themeConfig: {
outlineTitle: 'Su questa pagina',
sidebar: [
{
text: 'Kit di montaggio',
items: [
{ text: 'Istruzioni di montaggio', link: '/kit/' },
{ text: 'Elenco delle parti', link: '/description/' },
]
},
{
text: 'Manuale di configurazione',
items: [
{ text: 'Avvio', link: '/manual/#messa-in-funzione' },
{ text: 'Ricarica della Batteria', link: '/manual/#ricarica-della-batteria' },
{ text: 'Impostazioni', link: '/manual/#impostazioni' },
{ text: 'Aggiornamento', link: '/manual/#aggiornamento' },
{ text: 'Ripristino', link: '/manual/#ripristino-impostazioni' },
]
},
{
text: 'Manuale d\'uso',
items: [
{ text: 'Programmazione', link: '/usermanual/#programmazione' },
{ text: 'Attività', link: '/usermanual/#attivita' },
{ text: 'Blocchi', link: '/usermanual/blocks/' },
{ text: 'Programmi', link: '/usermanual/programs/' },
]
},
{
text: 'Guide',
items: [
{ text: 'Muovere CoderBot', link: '/guides/#muovere-coderbot' },
{ text: 'Programmiamo con i sensori', link: '/guides/#programmiamo-con-i-sensori' },
]
},
]
},
head: [
['script', {async: true, src: 'https://www.googletagmanager.com/gtag/js?id=G-JH5JX4PBZG'}],
['script', {}, "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-JH5JX4PBZG');"]
]
}

0 comments on commit 6af18d5

Please sign in to comment.