Skip to content

Commit

Permalink
ci: github pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Jan 25, 2025
1 parent ea7d5f8 commit ce1cb82
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 83 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# If you're using pnpm, add this step then change the commands and cache key below to use `pnpm`
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 8

- name: Install Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -35,8 +29,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
# this should match the `pages` option in your adapter-static options
path: 'dist/'
path: 'build/'

deploy:
needs: build_site
Expand All @@ -53,4 +46,4 @@ jobs:
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
19 changes: 17 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"@eslint/js": "^9.18.0",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@types/node": "^22.10.10",
"autoprefixer": "^10.4.20",
"bits-ui": "^0.22.0",
"clsx": "^2.1.1",
Expand All @@ -39,6 +40,7 @@
"vite": "^6.0.0"
},
"dependencies": {
"@sveltejs/adapter-static": "^3.0.8",
"all": "^0.0.0",
"mode-watcher": "^0.5.1"
}
Expand Down
16 changes: 6 additions & 10 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),

kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
}
adapter: adapter({ fallback: '404.html' }), paths: {
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH
}
},
preprocess: vitePreprocess()
};

export default config;
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler",

Check failure on line 12 in tsconfig.json

View workflow job for this annotation

GitHub Actions / build_site

Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
"outDir": "dist"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
}
Loading

0 comments on commit ce1cb82

Please sign in to comment.