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

Update Github actions #631

Merged
merged 15 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 170 additions & 0 deletions .github/workflows/build-deploy-staging-vitepress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: Build/Deploy to Staging (Vitepress)

on:
workflow_dispatch: # this makes the action manual

jobs:
neon:
name: Build Neon
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
working-directory: ./neon
run: npm install

- name: Make build
working-directory: ./neon
run: npm run docs:build

- name: Upload
uses: actions/upload-artifact@v3
with:
name: neon
path: neon/.vitepress/dist

invisible:
name: Build Invisible
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
working-directory: ./invisible
run: npm install

- name: Make build
working-directory: ./invisible
run: npm run docs:build

- name: Upload
uses: actions/upload-artifact@v3
with:
name: invisible
path: invisible/.vitepress/dist

alpha-lab:
name: Build Alpha Lab
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
working-directory: ./alpha-lab
run: npm install

- name: Make build
working-directory: ./alpha-lab
run: npm run docs:build

- name: Upload
uses: actions/upload-artifact@v3
with:
name: alpha-lab
path: alpha-lab/.vitepress/dist

landing-page:
name: Upload landing page
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Index - Upload
uses: actions/upload-artifact@v3
with:
name: landing-page
path: index.html

debugging-info:
name: Upload landing page
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Write commit SHA to gitcommit.txt
shell: bash
run: |
echo $GITHUB_SHA > gitcommit.txt

- name: Gitcommit - upload
uses: actions/upload-artifact@v3
with:
name: gitcommit
path: gitcommit.txt

deploy-staging:
name: Deploy to staging
runs-on: ubuntu-latest
environment:
name: staging
url: https://docs-staging.pupil-labs.com
needs: [neon, invisible, landing-page, alpha-lab, debugging-info]

steps:
- uses: actions/checkout@v3

- name: Get size of files
shell: bash
run: |
du -ah .

- name: Download Neon
uses: actions/download-artifact@v3
with:
name: gitcommit
path: gitcommit.txt

- name: Download Neon
uses: actions/download-artifact@v3
with:
name: neon
path: neon/

- name: Download Invisible
uses: actions/download-artifact@v3
with:
name: invisible
path: invisible/

- name: Download AlphaLab
uses: actions/download-artifact@v3
with:
name: alpha-lab
path: alpha-lab/

- name: Download landing page
uses: actions/download-artifact@v3
with:
name: landing-page
path: landing-page/


- name: Rsync action - Deploy to staging
uses: burnett01/[email protected]
with:
switches: -hrvz --delete --exclude=".htaccess"
path: .
remote_path: ${{ secrets.REMOTE_PATH }}
remote_host: ${{ secrets.REMOTE_HOST}}
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
1 change: 1 addition & 0 deletions alpha-lab/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: '/alpha-lab/',
head: [['link', { rel: 'icon', href: './favicon.png' }]],
ignoreDeadLinks: true,
title: "Alpha Lab",
Expand Down
2 changes: 1 addition & 1 deletion alpha-lab/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

169 changes: 169 additions & 0 deletions core/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
head: [['link', { rel: 'icon', href: './favicon.png' }]],
ignoreDeadLinks: true,
base: '/core/',
title: "Pupil Core",
description: "Documentation of the Pupil Core eye tracker and it's ecosystem.",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Getting Started', link: '/getting-started/first-recording/' },
{ text: 'General', link: '/general/module-technical-overview/' },
{ text: 'Data Collection', link: '/data-collection/' },
{
text: 'Software',
items: [
{ text: 'Pupil Cloud', link: '/pupil-cloud/' },
{ text: 'Neon Player', link: '/neon-player/' },
{ text: 'Neon XR', link: '/neon-xr/' },
]
},
{ text: 'Real-Time API', link: '/real-time-api/' },
{ text: 'Alpha Lab', link: 'https://docs.pupil-labs.com/alpha-lab/' },
{ text: 'Feedback', link: 'https://feedback.pupil-labs.com/' },
],

sidebar: {
"/getting-started/": [
{
text: 'Getting Started',
items: [
{ text: 'Your first Recording', link: '/getting-started/first-recording/' },
{ text: 'Understand the Ecosystem', link: '/getting-started/ecosystem/' }
]
}
],
"/general/": [
{
text: 'Neon Module',
items: [
{ text: 'Technical Overview', link: '/general/module-technical-overview/' },
{ text: 'Cleaning & Disinfecting', link: '/general/clean-and-disinfect/' },
]
},
{
text: 'Frames',
items: [
{ text: 'Swapping Frames', link: '/general/swapping-frames/' },
{ text: 'Make your own', link: '/general/make-your-own-frame/' },

]
},
{
text: 'Companion Device',
items: [
{ text: 'Compatible Devices', link: '/general/compatible-devices/' },
{ text: 'Using a USB Hub', link: '/general/using-a-usb-hub/' },

]
},
{
text: 'Recordings',
items: [
{ text: 'Overview', link: '/general/recordings/' },
{ text: 'Data Streams', link: '/general/data-streams/' },
{ text: 'Data Format', link: '/general/data-format/' },

]
},
{
text: 'Additional Data',
items: [
{ text: 'Events', link: '/general/events/' },
{ text: 'Wearers', link: '/general/wearers/' },
{ text: 'Templates', link: '/general/templates/' },

]
}
],
"/data-collection/": [
{
text: 'Tutorials',
items: [
{ text: 'Offset Correction', link: '/data-collection/offset-correction/' },
{ text: 'Measuring the IED', link: '/data-collection/measuring-the-IED/' },
{ text: 'Calibrating the IMU', link: '/data-collection/calibrating-the-imu/' },
]
},
{
text: 'Software & Integrations',
items: [
{ text: 'Monitor App', link: '/data-collection/monitor-app/' },
{ text: 'Lab Streaming Layer', link: '/data-collection/lab-streaming-layer/' },
{ text: 'PsychoPy', link: '/data-collection/psychopy/' },
]
},
{
text: 'How-To Guides',
items: [
{ text: 'Transfer Recordings via USB', link: '/data-collection/transfer-recordings-via-usb/' },
{ text: 'Time Synchronization', link: '/data-collection/time-synchronization/' },
]
},
],
"/pupil-cloud/": [
{
text: 'Tutorials',
items: [
{ text: 'Analysis in Pupil Coud', link: '/pupil-cloud/tutorials/' },
]
},
{
text: 'General',
items: [
{ text: 'Projects', link: '/pupil-cloud/projects/' },
{ text: 'Workspaces', link: '/pupil-cloud/workspaces/' },
]
},
{
text: 'Enrichments',
items: [
{ text: 'Reference Image Mapper', link: '/pupil-cloud/enrichments/reference-image-mapper/' },
{ text: 'Marker Mapper', link: '/pupil-cloud/enrichments/marker-mapper/' },
{ text: 'Face Mapper', link: '/pupil-cloud/enrichments/face-mapper/' },
]
},
{
text: 'Visualizations',
items: [
{ text: 'Heatmap', link: '/pupil-cloud/visualizations/heatmap/' },
{ text: 'Video Renderer', link: '/pupil-cloud/visualizations/video-renderer/' },
]
},
],
"/real-time-api/": [
{
text: 'Tutorials',
items: [
{ text: 'Tutorial', link: '/real-time-api/tutorials/' },
]
},
{
text: 'How-To Guides',
items: [
{ text: 'Track your Experiment Progress using Events', link: '/real-time-api/track-your-experiment-progress-using-events/' },
{ text: 'Track your Experiment in Matlab', link: '/real-time-api/track-your-experiment-in-matlab/' },

]
},
],
},

socialLinks: [
{ icon: 'discord', link: 'TODO' },
{ icon: 'youtube', link: 'TODO' },
{ icon: 'twitter', link: 'TODO' },

],

search: {
provider: 'local'
},

outline: [2, 3],
},
appearance: false,
})
15 changes: 15 additions & 0 deletions core/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import DefaultTheme from 'vitepress/theme'
// import Youtube from '/../components/Youtube.vue'
// import PhotoGrid from '/../components/PhotoGrid.vue'

import '/../custom.css'


export default {
extends: DefaultTheme,
enhanceApp(ctx) {
// register your custom global components
// ctx.app.component('Youtube', Youtube)
// ctx.app.component('PhotoGrid', PhotoGrid)
},
}
26 changes: 26 additions & 0 deletions core/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "Neon"
text: "Documentation"
tagline: My great project tagline
image: "./Module_Front.png"
actions:
- theme: brand
text: Getting Started
link: /getting-started/
- theme: alt
text: Pupil Cloud
link: /pupil-cloud/

features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

Loading