Skip to content

Commit

Permalink
added things related to Github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
grunkgrunk committed Aug 3, 2024
1 parent 3c74b50 commit fff7bb0
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 9 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy

on:
push:
branches:
- main

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

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

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build
15 changes: 8 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@histoire/plugin-svelte": "^0.16.1",
"@sveltejs/adapter-static": "^2.0.1",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.0.0",
"dateformat": "^5.0.3",
"eslint": "^8.28.0",
Expand Down
Binary file removed static/images/sample-image.png
Binary file not shown.
Binary file removed static/images/site-preview.png
Binary file not shown.
Binary file removed static/images/site-screenshot.png
Binary file not shown.
9 changes: 8 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ const extensions = ['.svelte', '.md'];
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter(),
adapter: adapter({
pages: 'build',
assets: 'build',
fallback: null
}),
paths: {
base: process.env.NODE_ENV === 'production' ? '/your-repo-name' : ''
},
prerender: {
handleHttpError: 'warn'
}
Expand Down

0 comments on commit fff7bb0

Please sign in to comment.