Skip to content

Commit 3ed7c00

Browse files
authored
Merge pull request #26 from smartify-org-uk/chore-workflow-automatic-documentation
Chore: add workflow for automatically building and deploying documentation folder
2 parents e3c60cf + 45d2e4e commit 3ed7c00

File tree

64 files changed

+1887
-27438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1887
-27438
lines changed

.github/workflows/docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Deploy documentation to gh-pages"
2+
run-name: "Deploy of documentation by @${{ github.triggering_actor }} (${{ github.ref }})"
3+
4+
on:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}-docs-deploy
9+
cancel-in-progress: true
10+
11+
jobs:
12+
deploy:
13+
name: "Deploy to GH Pages"
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
pages: write # to deploy to Pages
18+
id-token: write # to verify the deployment originates from an appropriate source
19+
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "22.13.0"
32+
cache: "npm"
33+
34+
- name: Cache base node_modules
35+
uses: actions/cache@v4
36+
with:
37+
path: node_modules
38+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
39+
restore-keys: ${{ runner.os }}-node-base
40+
41+
- name: Cache examples node_modules
42+
uses: actions/cache@v4
43+
with:
44+
path: examples/node_modules
45+
key: ${{ runner.os }}-node-${{ hashFiles('examples/package-lock.json') }}
46+
restore-keys: ${{ runner.os }}-node-docs
47+
48+
- name: Install all dependencies
49+
run: |
50+
npm ci
51+
npm --prefix examples ci
52+
53+
- name: Build api and examples docs
54+
run: |
55+
npm run makedocs
56+
npm --prefix examples run build
57+
58+
- name: Publish to GH Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
node_modules/
22
dist/
3+
docs/
4+
!docs/tutorial
5+

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.19.0

docs/01-helloworld/index.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/02-gps-and-sensors/index.html

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/03-api-communication/index.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/04-aframe/index.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/05-aframe-js/index.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/06-aframe-api-comm/index.html

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)