Skip to content

Commit

Permalink
Merge pull request #5 from wellsync/feat/gh-pages-workflow
Browse files Browse the repository at this point in the history
feat: deploy using github pages
  • Loading branch information
jeroenrinzema authored Jan 13, 2025
2 parents aec86a4 + 17c5c5d commit 51c2da2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 1 deletion.
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 22
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

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

- name: Build
run: pnpm run build

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
with:
# this should match the `pages` option in your adapter-static options
path: "build/"

# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build --base /pharmacy.js/",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json",
"generate:openapi": "openapi-typescript https://services.careconnect.dev.wellsync.io/openapi.yaml -o ./src/lib/api/types.generated.ts"
Expand Down

0 comments on commit 51c2da2

Please sign in to comment.