~repos /website
git clone https://pyrossh.dev/repos/website.git
木 Personal website of pyrossh. Built with astrojs, shiki, vite.
ff1edd96
—
pyrossh 1 year ago
add deploy
- .github/workflows/deploy.yml +35 -26
- static/{logo.curve → favicon.curve} +0 -0
- tests/test.js +2 -2
.github/workflows/deploy.yml
CHANGED
|
@@ -1,33 +1,42 @@
|
|
|
1
|
-
name: Deploy
|
|
1
|
+
name: Deploy to github pages
|
|
2
|
+
|
|
2
3
|
on:
|
|
3
4
|
push:
|
|
4
|
-
branches: [
|
|
5
|
+
branches: [$default-branch]
|
|
5
|
-
|
|
6
|
+
workflow_dispatch:
|
|
6
|
-
branches: main
|
|
7
7
|
|
|
8
|
-
jobs:
|
|
9
|
-
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
-
|
|
10
|
+
pages: write
|
|
11
|
-
|
|
11
|
+
id-token: write
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
concurrency:
|
|
14
|
-
|
|
14
|
+
group: 'pages'
|
|
15
|
-
|
|
15
|
+
cancel-in-progress: false
|
|
16
16
|
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
17
20
|
steps:
|
|
18
|
-
- name: Clone repository
|
|
19
|
-
|
|
21
|
+
- uses: actions/checkout@v3
|
|
22
|
+
- uses: actions/configure-pages@v4
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: 20
|
|
26
|
+
cache: npm
|
|
27
|
+
- run: npm ci
|
|
28
|
+
- run: npm run build
|
|
29
|
+
- uses: actions/upload-pages-artifact@v3
|
|
30
|
+
with:
|
|
31
|
+
path: ./build
|
|
20
32
|
|
|
33
|
+
deploy:
|
|
21
|
-
|
|
34
|
+
runs-on: ubuntu-latest
|
|
22
|
-
# uses: denoland/setup-deno@v1
|
|
23
|
-
|
|
35
|
+
needs: build
|
|
24
|
-
|
|
36
|
+
environment:
|
|
25
|
-
|
|
26
|
-
|
|
37
|
+
name: github-pages
|
|
27
|
-
|
|
38
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
28
|
-
|
|
39
|
+
steps:
|
|
29
|
-
|
|
40
|
+
- name: Deploy to GitHub Pages
|
|
41
|
+
id: deployment
|
|
30
|
-
|
|
42
|
+
uses: actions/deploy-pages@v4
|
|
31
|
-
# with:
|
|
32
|
-
# project: "clever-shrimp-70"
|
|
33
|
-
# entrypoint: "./main.ts"
|
static/{logo.curve → favicon.curve}
RENAMED
|
File without changes
|
tests/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { expect, test } from '@playwright/test';
|
|
2
2
|
|
|
3
3
|
test('index page has expected h1', async ({ page }) => {
|
|
4
|
-
|
|
4
|
+
await page.goto('/');
|
|
5
|
-
|
|
5
|
+
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
|
|
6
6
|
});
|