Skip to content

Commit 46bf3a5

Browse files
committed
Support custom Pages deployment
1 parent 0a18c46 commit 46bf3a5

4 files changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646
working-directory: app
4747
env:
4848
RUSTSCRIPT_REPO: ${{ github.workspace }}/rustscript
49-
VITE_BASE: /playground/
5049
- name: Deploy to gh-pages
5150
uses: peaceiris/actions-gh-pages@v4
5251
with:
5352
github_token: ${{ secrets.GITHUB_TOKEN }}
5453
publish_branch: gh-pages
5554
publish_dir: app/dist
55+
cname: rustscript.org
5656
force_orphan: true

public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rustscript.org

src/playgroundShell.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ export function mountPlaygroundUi(
203203
<span>Run or debug directly in wasm runtime with Monaco breakpoints, stepping controls, and hover variable inspect.</span>
204204
<span><a href="./about.html">Read more about the VM & RustScript here.</a></span>
205205
</p>
206+
<nav class="hero-links" aria-label="project links">
207+
<a href="https://github.com/rustscript-lang/playground" rel="noreferrer" target="_blank">Playground repo</a>
208+
<a href="https://github.com/rustscript-lang/rustscript" rel="noreferrer" target="_blank">RustScript repo</a>
209+
</nav>
206210
</div>
207211
</div>
208212
</section>

src/style.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,32 @@ body {
176176
text-underline-offset: 0.18em;
177177
}
178178

179+
.hero-links {
180+
display: flex;
181+
flex-wrap: wrap;
182+
gap: 0.5rem;
183+
margin-top: 0.65rem;
184+
}
185+
186+
.hero-links a {
187+
display: inline-flex;
188+
align-items: center;
189+
border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
190+
border-radius: 999px;
191+
padding: 0.3rem 0.65rem;
192+
background: color-mix(in srgb, var(--surface-elevated) 82%, var(--accent) 8%);
193+
color: var(--accent);
194+
font-size: 0.82rem;
195+
font-weight: 700;
196+
line-height: 1;
197+
text-decoration: none;
198+
}
199+
200+
.hero-links a:hover {
201+
border-color: color-mix(in srgb, var(--accent) 52%, transparent);
202+
background: color-mix(in srgb, var(--surface-elevated) 72%, var(--accent) 14%);
203+
}
204+
179205
.workspace {
180206
min-height: 0;
181207
height: 100%;

0 commit comments

Comments
 (0)