Skip to content

Commit

Permalink
reusable deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainCodeman committed Jun 22, 2023
1 parent 082ece3 commit 3d98dc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: |
pnpm run build
touch build/.nojekyll
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Build
run: pnpm run build

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
Expand All @@ -59,18 +58,11 @@ jobs:
needs: build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

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

- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
5 changes: 0 additions & 5 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import adapter from '@sveltejs/adapter-static'
import { vitePreprocess } from '@sveltejs/kit/vite'

const dev = process.argv.includes('dev')

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
Expand All @@ -11,9 +9,6 @@ const config = {

kit: {
adapter: adapter(),
paths: {
base: dev ? '' : process.env.BASE_PATH,
},
},
}

Expand Down

0 comments on commit 3d98dc0

Please sign in to comment.