fix(embed): don't claim an event is online when attendanceMode is unset #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Deploys the central tools site to THIS repo's GitHub Pages: the editor, | |
| # feed previewer and embeddable widget are served under /editor, /preview | |
| # and /embed (matching the tools.opentechevents.org/<tool>?repo=… URLs from | |
| # DESIGN.md; /import and /publish will join them in later phases). | |
| # | |
| # One-time prerequisite: Settings → Pages → Source = "GitHub Actions". | |
| # Custom domain (tools.opentechevents.org) is configured there too, later — | |
| # the app uses relative paths, so it works on both URLs unchanged. | |
| # | |
| # Not to be confused with build-pages.yml, the reusable workflow that the | |
| # ote-template forks call to publish THEIR feed sites. | |
| name: Deploy tools site | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - name: Assemble site | |
| run: | | |
| mkdir -p _site/editor _site/preview _site/embed _site/embed/latest | |
| cp -R apps/editor/dist/. _site/editor/ | |
| cp -R apps/preview/dist/. _site/preview/ | |
| if [ -d apps/embed/versions ]; then | |
| cp -R apps/embed/versions/. _site/embed/ | |
| fi | |
| cp -R apps/embed/dist/. _site/embed/ | |
| cp -R apps/embed/dist/. _site/embed/latest/ | |
| # Served at tools.opentechevents.org/dashboard-checks.js; the | |
| # ote-template forks load it from their dashboard. No build step: | |
| # the file is the artifact. | |
| cp apps/dashboard-checks/dashboard-checks.js _site/dashboard-checks.js | |
| cat > _site/index.html <<'EOF' | |
| <!doctype html> | |
| <html lang="en"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>OpenTechEvents tools</title> | |
| <h1>OpenTechEvents tools</h1> | |
| <ul> | |
| <li><a href="./editor/">Event editor</a> — create and edit OTE events without writing JSON</li> | |
| <li><a href="./preview/">Feed previewer</a> — inspect generated JSON, ICS and RSS exports</li> | |
| <li><a href="./embed/">Embeddable widget</a> — <ote-events>: drop an OTE feed into any website</li> | |
| </ul> | |
| </html> | |
| EOF | |
| - uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |