Skip to content

Commit

Permalink
👷 add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsliu9121 committed Jun 17, 2022
1 parent b3f4b25 commit 1140d6e
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 7 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Deploy

on:
release:
types:
- published

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build 🔧
run: |
yarn install --frozen-lockfile
yarn run build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inkrosetta.tw
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint": "eslint ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-static": "^1.0.0-next.34",
"@sveltejs/kit": "next",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
Expand Down
16 changes: 10 additions & 6 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-auto';
import preprocess from 'svelte-preprocess';
import adapter from '@sveltejs/adapter-static'
import preprocess from 'svelte-preprocess'
import importAssets from 'svelte-preprocess-import-assets'
import {vanillaExtractPlugin} from '@vanilla-extract/vite-plugin'

Expand All @@ -10,7 +10,11 @@ const config = {
preprocess: [preprocess(), importAssets()],

kit: {
adapter: adapter(),
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: null,
}),

prerender: {
default: true,
Expand All @@ -29,7 +33,7 @@ const config = {
noExternal: ['@vanilla-extract/css', '@vanilla-extract/sprinkles', '@vanilla-extract/css/fileScope'],
},
},
}
};
},
}

export default config;
export default config
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@
set-cookie-parser "^2.4.8"
tiny-glob "^0.2.9"

"@sveltejs/adapter-static@^1.0.0-next.34":
version "1.0.0-next.34"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-static/-/adapter-static-1.0.0-next.34.tgz#f17e967e43f73e57feed6d81d8151de1e09d9836"
integrity sha512-XjuMhemme5z0L/B2nTZpA6k+RJjF+b6L96ts6gIQ6ixiCzJQSbBqJhrrBYBCaeLAKvdUMoGEmX8m862JhKjRFg==
dependencies:
tiny-glob "^0.2.9"

"@sveltejs/[email protected]":
version "1.0.0-next.58"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-vercel/-/adapter-vercel-1.0.0-next.58.tgz#1ccd0cb464984f5bd59d700a91bedae93a35e70e"
Expand Down

0 comments on commit 1140d6e

Please sign in to comment.