Skip to content

Commit 37e5ec1

Browse files
committed
fix: make asset links in the example bundle relative with vite
1 parent d7be4c4 commit 37e5ec1

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ concurrency:
1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17+
# permissions on the GITHUB_TOKEN for semantic-release
18+
# see https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/ci-configurations/github-actions.md
19+
permissions:
20+
contents: write # to be able to publish a GitHub release
21+
issues: write # to be able to comment on released issues
22+
pull-requests: write # to be able to comment on released pull requests
1723

1824
steps:
1925
- uses: actions/checkout@v4
@@ -30,6 +36,13 @@ jobs:
3036
with:
3137
path: "./apps/browser-example/dist/"
3238

39+
# do the semantic-release release notes
40+
- env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
# TODO: NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
run: |
44+
npx semantic-release@24
45+
3346
pages:
3447
needs: build
3548
runs-on: ubuntu-latest
@@ -45,19 +58,3 @@ jobs:
4558
# https://github.com/actions/deploy-pages & https://github.com/actions/starter-workflows/blob/main/pages/static.yml
4659
- uses: actions/deploy-pages@v4
4760
id: deployment
48-
49-
release:
50-
needs: build
51-
runs-on: ubuntu-latest
52-
# permissions on the GITHUB_TOKEN to allow deployment to GitHub Pages and for semantic-release
53-
permissions:
54-
contents: write # to be able to publish a GitHub release
55-
issues: write # to be able to comment on released issues
56-
pull-requests: write # to be able to comment on released pull requests
57-
id-token: write # to enable use of OIDC for npm provenance and github pages publishing
58-
steps:
59-
- env:
60-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61-
# TODO: NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
62-
run: |
63-
npx semantic-release@24

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# tsorta: TypeScript OpenAPI Realtime API
1+
# tsorta: TypeScript OpenAI Realtime API
22

33
This repo is for an article I've written about how to use the OpenAI Realtime API with TypeScript + React and WebRTC.
44
It is a working example that you can experience the Realtime API with yourself. The WebRTC client also does some heavy lifting around managing the conversation state and audio streams.

apps/browser-example/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>TypeScript with OpenAI Realtime API</title>
88
</head>
99
<body>
1010
<div id="root"></div>

apps/browser-example/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react"
33

44
// https://vite.dev/config/
55
export default defineConfig({
6+
base: "", // This makes Vite use relative paths
67
plugins: [react()],
78
css: {
89
// https://vite.dev/config/shared-options.html#css-preprocessoroptions

0 commit comments

Comments
 (0)