From fb0ce545003ec09cdd7c90fb910eda74d61bdae2 Mon Sep 17 00:00:00 2001 From: Jay Kim <76601570+yeonkim1213@users.noreply.github.com> Date: Tue, 9 Jun 2026 11:44:17 -0600 Subject: [PATCH 1/3] Update workflow to preserve tutorial files --- .github/workflows/sync_from_upstream.yaml | 4 ++++ .github/workflows/sync_from_upstream_test.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/sync_from_upstream.yaml b/.github/workflows/sync_from_upstream.yaml index 3562c19a07..63c0671112 100644 --- a/.github/workflows/sync_from_upstream.yaml +++ b/.github/workflows/sync_from_upstream.yaml @@ -56,8 +56,12 @@ 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 git checkout "$TEMPLATE_HEAD" -- \ + .env \ README.md \ + public/tutorial \ + src/public/tutorial \ .github/workflows/sync_from_upstream.yaml \ .github/workflows/sync_from_upstream_test.yaml diff --git a/.github/workflows/sync_from_upstream_test.yaml b/.github/workflows/sync_from_upstream_test.yaml index 82a3a31ffe..337946f9ee 100644 --- a/.github/workflows/sync_from_upstream_test.yaml +++ b/.github/workflows/sync_from_upstream_test.yaml @@ -61,8 +61,12 @@ 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 git checkout "$TEMPLATE_HEAD" -- \ + .env \ README.md \ + public/tutorial \ + src/public/tutorial \ .github/workflows/sync_from_upstream.yaml \ .github/workflows/sync_from_upstream_test.yaml From b81418dbc75426cc9b78c2120a8509f467ac3807 Mon Sep 17 00:00:00 2001 From: Jay Kim <76601570+yeonkim1213@users.noreply.github.com> Date: Tue, 9 Jun 2026 23:38:16 -0600 Subject: [PATCH 2/3] Update workflows for template repo --- .env | 5 +- .github/workflows/deploy_website.yaml | 85 ------------------- .github/workflows/pr_close.yaml | 30 ------- .github/workflows/release.yaml | 58 ------------- .github/workflows/release_github.yaml | 24 ------ .github/workflows/sync_from_upstream.yaml | 11 ++- .../workflows/sync_from_upstream_test.yaml | 6 ++ README.md | 10 ++- public/README.md | 20 +++-- 9 files changed, 34 insertions(+), 215 deletions(-) delete mode 100644 .github/workflows/pr_close.yaml delete mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/release_github.yaml diff --git a/.env b/.env index 2c7eb479f8..ac7d3ef8df 100644 --- a/.env +++ b/.env @@ -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 - diff --git a/.github/workflows/deploy_website.yaml b/.github/workflows/deploy_website.yaml index ecfc36697b..6b765d778e 100644 --- a/.github/workflows/deploy_website.yaml +++ b/.github/workflows/deploy_website.yaml @@ -5,7 +5,6 @@ on: branches: - main workflow_dispatch: - pull_request: jobs: deploy-main: @@ -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." diff --git a/.github/workflows/pr_close.yaml b/.github/workflows/pr_close.yaml deleted file mode 100644 index 80330dbf76..0000000000 --- a/.github/workflows/pr_close.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: delete preview on PR close -on: - pull_request: - types: [closed] - -jobs: - delete_preview: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - name: make empty dir - run: mkdir public - - - name: delete folder - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public - destination_dir: "PR${{ github.event.number }}" - - - 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: "🪓 PR closed, deleted preview." \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 149627db36..0000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: Release new version - -on: - pull_request: - branches: [main] - types: [closed] - -jobs: - release: - if: github.event.pull_request.merged && startsWith(github.event.pull_request.title, 'v') - runs-on: ubuntu-latest - steps: - - name: Ensure PR title matches vx.x.x - run: | - [[ "${{ github.event.pull_request.title }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] - shell: bash - - - uses: actions/checkout@v3 - with: - token: ${{ secrets.PAT }} - - - name: Run make-release.sh to modify version numbers across the repo - run: | - find src public -type f -exec env LANG=C sed -i -E "s/githubusercontent\.com\/re[Vv][Ii][Ss]it-studies\/study\/.*\/src/githubusercontent.com\/revisit-studies\/study\/${{ github.event.pull_request.title }}\/src/g" {} + - find src public -type f -exec env LANG=C sed -i -E "s/github.com\/re[Vv][Ii][Ss]it-studies\/study\/tree\/v[^\/]*\/([^\s]*)/github.com\/revisit-studies\/study\/tree\/${{ github.event.pull_request.title }}\/\1/g" {} + - - - name: Commit changes - run: | - git config --local user.email "jackwilburn@tutanota.com" - git config --local user.name "Jack Wilburn" - git add . - git commit -m "Release version ${{ github.event.pull_request.title }}" - git tag -a ${{ github.event.pull_request.title }} -m "Release version ${{ github.event.pull_request.title }}" - git push --follow-tags - - - uses: peter-evans/repository-dispatch@v2 - name: Build documentation in revisit.dev if repo is in revisit-studies - if: ${{ github.repository_owner == 'revisit-studies' }} - with: - token: ${{ secrets.PAT }} - repository: revisit-studies/reVISit-studies.github.io - event-type: study_repo_publish - - - uses: peter-evans/repository-dispatch@v2 - name: Build documentation in revisit.dev if repo is in revisit-studies - if: ${{ github.repository_owner == 'revisit-studies' }} - with: - token: ${{ secrets.PAT }} - repository: revisit-studies/revisitpy - event-type: study_repo_publish - - - uses: peter-evans/repository-dispatch@v2 - name: Build documentation in revisit.dev if repo is in revisit-studies - if: ${{ github.repository_owner == 'revisit-studies' }} - with: - token: ${{ secrets.PAT }} - repository: revisit-studies/revisitpy-server - event-type: study_repo_publish diff --git a/.github/workflows/release_github.yaml b/.github/workflows/release_github.yaml deleted file mode 100644 index c2008d9989..0000000000 --- a/.github/workflows/release_github.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Create release - -on: - push: - tags: - - v* - -permissions: - contents: write - -jobs: - release: - name: Release pushed tag - runs-on: ubuntu-latest - steps: - - name: Create release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} - run: | - gh release create "$tag" \ - --repo="$GITHUB_REPOSITORY" \ - --title="${tag}" \ - --generate-notes diff --git a/.github/workflows/sync_from_upstream.yaml b/.github/workflows/sync_from_upstream.yaml index 63c0671112..c095b667ca 100644 --- a/.github/workflows/sync_from_upstream.yaml +++ b/.github/workflows/sync_from_upstream.yaml @@ -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: @@ -57,9 +56,15 @@ jobs: # 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/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 \ diff --git a/.github/workflows/sync_from_upstream_test.yaml b/.github/workflows/sync_from_upstream_test.yaml index 337946f9ee..45a77ea19c 100644 --- a/.github/workflows/sync_from_upstream_test.yaml +++ b/.github/workflows/sync_from_upstream_test.yaml @@ -62,9 +62,15 @@ jobs: # 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/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 \ diff --git a/README.md b/README.md index f6d69357e8..a9a5f1ff37 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/public/README.md b/public/README.md index f898ed96b9..88c81c3954 100644 --- a/public/README.md +++ b/public/README.md @@ -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. From e6594ae7b184f8ac89982c3d68c0452d2c78b0b8 Mon Sep 17 00:00:00 2001 From: Jay Kim <76601570+yeonkim1213@users.noreply.github.com> Date: Tue, 9 Jun 2026 23:39:56 -0600 Subject: [PATCH 3/3] Remove playwright workflow from template --- .github/workflows/playwright.yml | 63 ------------------- .github/workflows/sync_from_upstream.yaml | 1 + .../workflows/sync_from_upstream_test.yaml | 1 + 3 files changed, 2 insertions(+), 63 deletions(-) delete mode 100644 .github/workflows/playwright.yml diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 229dbfdb41..0000000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Playwright Tests - -on: - pull_request: - branches: - - dev - - main - -jobs: - test: - name: 🧪 ${{ matrix.project }} E2E Tests - runs-on: ${{ matrix.os }} - timeout-minutes: 20 - env: - PLAYWRIGHT_BROWSERS_PATH: ${{ matrix.cache_dir }} - PW_CI_REPORTER: dot - PW_CI_WORKERS: ${{ matrix.workers }} - strategy: - fail-fast: false - matrix: - include: - - project: chromium - os: ubuntu-latest - cache_dir: /home/runner/.cache/ms-playwright - workers: 3 - - # - project: firefox - # os: ubuntu-latest - # cache_dir: ~/.cache/ms-playwright - - - project: webkit - os: macos-14 - cache_dir: /Users/runner/Library/Caches/ms-playwright - workers: 2 - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: "yarn" - - - name: Install dependencies - env: - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: yarn install --immutable - - - name: Write out playwright version - run: yarn --silent playwright --version > .playwright-version - - - name: ⚡️ Cache playwright binaries - uses: actions/cache@v4 - id: playwright-cache - with: - path: ${{ matrix.cache_dir }} - key: ${{ runner.os }}-${{ matrix.project }}-pw-${{ hashFiles('**/.playwright-version') }} - - - name: Install Playwright Browsers - if: steps.playwright-cache.outputs.cache-hit != 'true' - run: yarn playwright install --with-deps ${{ matrix.project }} - - - name: Run Playwright tests - run: yarn test --project=${{ matrix.project }} diff --git a/.github/workflows/sync_from_upstream.yaml b/.github/workflows/sync_from_upstream.yaml index c095b667ca..653d3df520 100644 --- a/.github/workflows/sync_from_upstream.yaml +++ b/.github/workflows/sync_from_upstream.yaml @@ -58,6 +58,7 @@ jobs: 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" -- \ diff --git a/.github/workflows/sync_from_upstream_test.yaml b/.github/workflows/sync_from_upstream_test.yaml index 45a77ea19c..8d0937d5fc 100644 --- a/.github/workflows/sync_from_upstream_test.yaml +++ b/.github/workflows/sync_from_upstream_test.yaml @@ -64,6 +64,7 @@ jobs: 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" -- \