Skip to content

Commit 01b5e47

Browse files
authored
Merge pull request #17 from developmentseed/feature/deploy-action
Add deploy workflow
2 parents 353ea33 + 22af810 commit 01b5e47

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

Diff for: .github/workflows/deploy.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ] # Set this to your default branch name
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '23'
27+
cache: 'pnpm'
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v2
31+
with:
32+
version: 9.15.9
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
37+
- name: Build
38+
run: pnpm run build
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: './dist'
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

Diff for: vite.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ import react from "@vitejs/plugin-react";
33

44
// https://vite.dev/config/
55
export default defineConfig({
6+
base: '/spatial-access-measures/',
67
plugins: [react()],
78
});

0 commit comments

Comments
 (0)