Skip to content

Commit 48ea603

Browse files
clean up dir
1 parent 5540479 commit 48ea603

File tree

7 files changed

+53
-29
lines changed

7 files changed

+53
-29
lines changed

.github/workflows/deploy.yml

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,49 @@ on:
44
push:
55
branches: [ main ]
66

7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
716
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '18'
27+
cache: 'npm'
28+
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v4
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Build
36+
run: npm run build
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: ./dist
42+
843
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
947
runs-on: ubuntu-latest
10-
48+
needs: build
1149
steps:
12-
- uses: actions/checkout@v3
13-
14-
- name: Setup Node.js
15-
uses: actions/setup-node@v3
16-
with:
17-
node-version: '18'
18-
cache: 'npm'
19-
20-
- name: Install dependencies
21-
run: npm ci
22-
23-
- name: Build
24-
run: npm run build
25-
26-
- name: Deploy to GitHub Pages
27-
uses: actions/deploy-pages@v2
28-
with:
29-
token: ${{ secrets.GITHUB_TOKEN }}
30-
path: ./dist
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
dist/

node_modules/.vite/deps/_metadata.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html renamed to src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Xterm Test</title>
7-
<link rel="stylesheet" href="style.css" />
7+
<link rel="stylesheet" href="./style.css" />
88
</head>
99
<body>
1010
<div id="terminal"></div>
11-
<script type="module" src="script.js"></script>
11+
<script type="module" src="./script.js"></script>
1212
</body>
1313
</html>
File renamed without changes.
File renamed without changes.

vite.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { defineConfig } from 'vite'
22

33
export default defineConfig({
4-
root: '.',
4+
root: './src',
55
server: {
66
port: 3000,
77
open: true
88
},
99
build: {
10-
outDir: 'dist'
10+
outDir: '../dist'
1111
}
1212
})

0 commit comments

Comments
 (0)