Skip to content

Commit ff7b16c

Browse files
committed
Remove top-level await and add build script
1 parent 6429127 commit ff7b16c

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

.github/workflows/spa.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy SPA to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
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+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
env:
32+
STORE_PATH: ''
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v4
40+
41+
- uses: pnpm/action-setup@v3
42+
name: Install pnpm
43+
with:
44+
version: 8
45+
run_install: false
46+
47+
- uses: actions/setup-node@v4
48+
name: Setup node
49+
with:
50+
node-version: latest
51+
cache: 'pnpm'
52+
cache-dependency-path: pnpm-lock.yaml
53+
54+
- name: Install dependencies
55+
run: |
56+
pnpm install
57+
58+
- name: Build SPA
59+
run: |
60+
npm run build-only
61+
62+
- name: Upload artifact
63+
uses: actions/upload-pages-artifact@v1
64+
with:
65+
# Upload entire repository
66+
path: './dist'
67+
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v3

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import './assets/main.scss';
33

44
import { createApp } from 'vue';
55
import { loader } from '@guolao/vue-monaco-editor';
6+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
67
// import { Quasar, type QuasarPluginOptions } from 'quasar';
78

89
// Import icon libraries
@@ -15,7 +16,7 @@ import App from './App.vue';
1516
import router from './router.ts';
1617

1718
loader.config({
18-
monaco: await import('monaco-editor/esm/vs/editor/editor.api'),
19+
monaco,
1920
});
2021

2122
const app = createApp(App);

0 commit comments

Comments
 (0)