Skip to content

Commit 51c2da2

Browse files
Merge pull request #5 from wellsync/feat/gh-pages-workflow
feat: deploy using github pages
2 parents aec86a4 + 17c5c5d commit 51c2da2

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Install pnpm
16+
uses: pnpm/action-setup@v2
17+
with:
18+
version: 8
19+
20+
- name: Install Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 22
24+
cache: pnpm
25+
26+
- name: Install dependencies
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v3
31+
with:
32+
static_site_generator: sveltekit
33+
34+
- name: Build
35+
run: pnpm run build
36+
37+
- name: Upload Artifacts
38+
uses: actions/upload-pages-artifact@v1
39+
with:
40+
# this should match the `pages` option in your adapter-static options
41+
path: "build/"
42+
43+
# Deploy job
44+
deploy:
45+
# Add a dependency to the build job
46+
needs: build
47+
48+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
49+
permissions:
50+
pages: write # to deploy to Pages
51+
id-token: write # to verify the deployment originates from an appropriate source
52+
53+
# Deploy to the github-pages environment
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
58+
# Specify runner + deployment step
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "vite build --base /pharmacy.js/",
8+
"build": "vite build",
99
"preview": "vite preview",
1010
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json",
1111
"generate:openapi": "openapi-typescript https://services.careconnect.dev.wellsync.io/openapi.yaml -o ./src/lib/api/types.generated.ts"

0 commit comments

Comments
 (0)