Skip to content

Commit

Permalink
feat: deploy to pages on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ubermanu committed Sep 24, 2023
1 parent 35b39b0 commit 757f31b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: gh-pages

on:
push:
tags: [ '*' ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
publish:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v3
with:
node-version: 19
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- run: pnpm i
- run: pnpm -r build
env:
SVELTEKIT_BASE_URL: /roller

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'sites/roller/build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 3 additions & 1 deletion sites/roller/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const config = {
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(),
},

preprocess: vitePreprocess(),
paths: {
base: process.env.SVELTEKIT_BASE_URL || '',
},
}

export default config

0 comments on commit 757f31b

Please sign in to comment.