Skip to content
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
5 changes: 1 addition & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ VITE_FIREBASE_CONFIG='
'
VITE_STORAGE_ENGINE="localStorage" # "firebase" or "supabase" or "localStorage" or your own custom storage engine
VITE_RECAPTCHAV3TOKEN="6LdjOd0lAAAAAASvFfDZFWgtbzFSS9Y3so8rHJth" # recaptcha SITE KEY
VITE_REPO_URL="https://github.com/revisit-studies/study/tree/main/public/" # Set the url for the "view source" link on the front page
VITE_REPO_URL="https://github.com/revisit-studies/template/tree/main/public/" # Set the url for the "view source" link on the front page

VITE_SUPABASE_URL="https://supabase.revisit.dev"
VITE_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzYwNjgwODAwLCJleHAiOjE5MTg0NDcyMDB9.IohiSvWUtjylJgn4gMrK3aYfnbz-hUmyb3h87DrQvTc"

VITE_OPENAI_API_URL="https://apps.vdl.sci.utah.edu/openai-proxy" # Your proxy URL for OpenAI API requests

85 changes: 0 additions & 85 deletions .github/workflows/deploy_website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
workflow_dispatch:
pull_request:

jobs:
deploy-main:
Expand Down Expand Up @@ -44,87 +43,3 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

deploy-dev:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/dev'}}
permissions:
contents: write
concurrency:
group: dev-deploy
cancel-in-progress: true

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'

- run: yarn install --immutable

- name: Build dev branch
run: VITE_BASE_PATH=/dev yarn build
env:
VITE_BASE_PATH: "/dev/"

- uses: peaceiris/actions-gh-pages@v3
name: Deploy dev branch
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
destination_dir: "dev"

pr-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
if: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}

steps:
- name: Comment on PR
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "Starting deployment of preview ⏳..."

- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'

- run: yarn install --immutable

# Build with github environment variables
- name: Build with github environment variables
if: ${{ vars.VITE_STORAGE_ENGINE != '' }}
run: VITE_STORAGE_ENGINE=$VITE_STORAGE_ENGINE VITE_BASE_PATH=$VITE_BASE_PATH yarn build
env:
VITE_STORAGE_ENGINE: ${{ vars.VITE_STORAGE_ENGINE }}
VITE_BASE_PATH: "/study/PR${{ github.event.number }}/"

- name: Push PR deploy preview
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
destination_dir: "PR${{ github.event.number }}"

- name: Update comment
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "A preview of ${{ github.event.after }} is uploaded and can be seen here:\n\n ✨ https://revisit.dev/study/PR${{ github.event.number }} ✨\n\nChanges may take a few minutes to propagate."
63 changes: 0 additions & 63 deletions .github/workflows/playwright.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pr_close.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/release.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/release_github.yaml

This file was deleted.

16 changes: 13 additions & 3 deletions .github/workflows/sync_from_upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ name: Sync from Upstream
# template-specific files on top and force-pushes. This keeps the template
# from falling behind upstream in git history.
#
# Note: deploy_website.yaml is synced from upstream but the deployment base
# path (/template/) is controlled by GitHub Environment secrets, not the
# workflow file itself, so syncing it is safe.
# Note: deploy_website.yaml is template-specific because this repo only
# publishes the main template site, not dev or per-PR previews.

on:
workflow_dispatch:
Expand Down Expand Up @@ -56,8 +55,19 @@ jobs:
# be restored from before the reset.
# Note: public/global.json is handled separately below so the $schema
# version is always taken from upstream rather than frozen in TEMPLATE_HEAD.
rm -rf public/tutorial src/public/tutorial
rm -f \
.github/workflows/pr_close.yaml \
.github/workflows/playwright.yml \
.github/workflows/release.yaml \
.github/workflows/release_github.yaml
git checkout "$TEMPLATE_HEAD" -- \
.env \
README.md \
.github/workflows/deploy_website.yaml \
public/README.md \
public/tutorial \
src/public/tutorial \
.github/workflows/sync_from_upstream.yaml \
.github/workflows/sync_from_upstream_test.yaml

Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/sync_from_upstream_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,19 @@ jobs:
# be restored from before the reset.
# Note: public/global.json is handled separately below so the $schema
# version is always taken from upstream rather than frozen in TEMPLATE_HEAD.
rm -rf public/tutorial src/public/tutorial
rm -f \
.github/workflows/pr_close.yaml \
.github/workflows/playwright.yml \
.github/workflows/release.yaml \
.github/workflows/release_github.yaml
git checkout "$TEMPLATE_HEAD" -- \
.env \
README.md \
.github/workflows/deploy_website.yaml \
public/README.md \
public/tutorial \
src/public/tutorial \
.github/workflows/sync_from_upstream.yaml \
.github/workflows/sync_from_upstream_test.yaml

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# reVISit study – Interactive, Web-Based User Studies.

Create your own interactive, web-based data online experiement by setting up your own repository based on this template. The template tracks stable releases of revisit, i.e., the main branch of https://github.com/revisit-studies/study/.
Create your own interactive, web-based data online experiment by setting up your own repository based on this template. The template tracks stable releases of revisit, i.e., the main branch of https://github.com/revisit-studies/study/.

To get started with this template, see the instructions on [how to use this template](https://revisit.dev/docs/getting-started/installation/#starting-from-the-template-repository-recommended).

To see anything on the page you'll be serving, you should will need to set up a [basic study](https://revisit.dev/docs/getting-started/your-first-study/).
To see anything on the page you'll be serving, you will need to set up a [basic study](https://revisit.dev/docs/getting-started/your-first-study/).

For general tutorials and documentation on reVISit, see the [reVISit website](https://revisit.dev).

Useful tutorial links:

* [Tutorial guide](https://revisit.dev/docs/tutorial/)
* [Tutorial config reference](https://revisit.dev/docs/tutorial/config.json/)
* [Replication tutorial config reference](https://revisit.dev/docs/tutorial/replication-config.json/)


## Build Instructions

Expand Down
20 changes: 11 additions & 9 deletions public/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# The Public Folder: Experiment Configs, Stimuli and Resources

Files that are in the `public` folder are exposed on the study website. For technical reasons, all static files (including reVISit configurations) have to be in the public folder.
Files that are in the `public` folder are exposed on the study website. For technical reasons, all static files, including reVISit configurations, have to be in the public folder.

If you want to create a new experiment, you should create a new subfolder in this `public` folder that contains your reVISit config.

Study folder names can include periods (`.`), spaces, and other characters, but reVISit normalizes study URLs by replacing periods/spaces/slashes with underscores. Use links generated in the app to avoid mismatched manual URLs.
Study folder names can include periods (`.`), spaces, and other characters, but reVISit normalizes study URLs by replacing periods, spaces, and slashes with underscores. Use links generated in the app to avoid mismatched manual URLs.

Example projects that explain basic reVISit functionality are:
Example projects that explain basic reVISit functionality are:

* [image-demo](image-demo) is the most basic study example that uses images for study stimuli.
* [html-input](html-demo) demonstrates how to use a HTML/JS stimulus.
* Check out the [deployed study page] for a full list and descriptions of the projects.
- [tutorial](tutorial), the starter tutorial study included in this template.
- [Tutorial guide](https://revisit.dev/docs/tutorial/)
- [Tutorial config reference](https://revisit.dev/docs/tutorial/config.json/)
- [Replication tutorial config reference](https://revisit.dev/docs/tutorial/replication-config.json/)

Folders that don't contain an experiment are:
Folders that don't contain an experiment are:

* `assets` which contains logos, etc.
* [configs](configs) which contains a reference of the reVISit config
- [libraries](libraries) which contains reusable reVISit study libraries.
- [revisitAssets](revisitAssets) which contains shared reVISit assets.
- [revisitUtilities](revisitUtilities) which contains shared utility files used by the app.
Loading