Skip to content

Commit bafda70

Browse files
deploy to github pages
show token-bucket visualizer as home page
1 parent 3bf2a57 commit bafda70

File tree

9 files changed

+610
-536
lines changed

9 files changed

+610
-536
lines changed

.github/workflows/deploy.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [master]
8+
9+
# Allows you to run this workflow manually from the Actions tab on GitHub.
10+
workflow_dispatch:
11+
12+
# Allow this job to clone the repo and create a page deployment
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
31+
- name: Install pnpm
32+
uses: pnpm/action-setup@v2
33+
with:
34+
version: 8
35+
36+
- name: Install Node.js
37+
uses: actions/setup-node@v3
38+
with:
39+
node-version: 18
40+
cache: pnpm
41+
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
44+
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v3
47+
with:
48+
static_site_generator: sveltekit
49+
50+
- name: Build
51+
run: pnpm run build
52+
53+
- name: Upload Artifacts
54+
uses: actions/upload-pages-artifact@v1
55+
with:
56+
# this should match the `pages` option in your adapter-static options
57+
path: 'build/'
58+
59+
deploy:
60+
needs: build
61+
runs-on: ubuntu-latest
62+
63+
environment:
64+
name: github-pages
65+
url: ${{ steps.deployment.outputs.page_url }}
66+
67+
steps:
68+
- name: Deploy
69+
id: deployment
70+
uses: actions/deploy-pages@v1

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"emulators:start": "firebase emulators:start --import ./snapshot --export-on-exit --project demo-project"
6060
},
6161
"devDependencies": {
62-
"@sveltejs/adapter-auto": "^3.2.0",
62+
"@sveltejs/adapter-static": "^3.0.1",
6363
"@sveltejs/kit": "^2.5.4",
6464
"@sveltejs/vite-plugin-svelte": "^3.0.2",
6565
"@tailwindcss/forms": "^0.5.7",

pnpm-lock.yaml

+8-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)