Skip to content

Commit

Permalink
github pages (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
TSKsmiley committed Feb 22, 2024
2 parents 796c3ad + db00cdf commit a4a64df
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
name: Deploy to GitHub Pages
name: GitHub Pages

on:
push:
branches: main
workflow_dispatch:

jobs:
build:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install and Build
run: |
yarn install --frozen-lockfile
yarn run build
- name: Build
run: yarn build

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
uses: peaceiris/actions-gh-pages@v3
with:
branch: gh-pages
folder: public
publish_dir: ./build
deploy_key: ${{ secrets.SECRET_KEY }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"type": "module",
"dependencies": {
"@sveltejs/adapter-static": "^3.0.1",
"mermaid": "^10.8.0",
"svelte-purify": "^1.1.11"
}
Expand Down
1 change: 1 addition & 0 deletions src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const prerender = true;
2 changes: 1 addition & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from "@sveltejs/adapter-auto";
import adapter from "@sveltejs/adapter-static";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";

Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@
dependencies:
import-meta-resolve "^4.0.0"

"@sveltejs/adapter-static@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-static/-/adapter-static-3.0.1.tgz#64c36020435d7b1eacd362b2d027fefda5ec2e44"
integrity sha512-6lMvf7xYEJ+oGeR5L8DFJJrowkefTK6ZgA4JiMqoClMkKq0s6yvsd3FZfCFvX1fQ0tpCD7fkuRVHsnUVgsHyNg==

"@sveltejs/kit@^2.0.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-2.5.0.tgz#5785b40ab00b6aa0758812c69a6a0d1c646d823b"
Expand Down

0 comments on commit a4a64df

Please sign in to comment.