Skip to content

Commit

Permalink
add deploy github pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lhapaipai committed Sep 30, 2024
1 parent 7d38077 commit 7f036c2
Show file tree
Hide file tree
Showing 8 changed files with 605 additions and 121 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deploy-lonlat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy lonlat

on:
push:
branches: [main]

permissions:
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: "Install JS dependencies"
run: "pnpm i --frozen-lockfile"

- name: Build pentatrion-geo and front
run: pnpm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: apps/front/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 4 additions & 1 deletion apps/sandbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ <h2 class="mb-2 mt-8">Vanilla Maplibre</h2>
<li><a href="/src/m/44-style-spec/index.html">44-style-spec</a></li>
<li><a href="/src/m/45-contextmenu/index.html">45-contextmenu</a></li>
<li><a href="/src/m/46-sandbox/index.html">46-sandbox</a></li>
<li><a href="/src//index.html"></a></li>
<li><a href="/src/m/47-custom-layer/index.html">47-custom-layer</a></li>
<li>
<a href="/src/m/48-custom-windmap/index.html">48-custom-windmap</a>
</li>
<li><a href="/src//index.html"></a></li>
<li><a href="/src//index.html"></a></li>
<li><a href="/src//index.html"></a></li>
Expand Down
4 changes: 3 additions & 1 deletion apps/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"immutable": "5.0.0-beta.5",
"lil-gui": "^0.19.2",
"maplibre-gl": "^4.5.0",
"maplibre-theme": "^0.1.0",
"nanoid": "^5.0.7",
Expand Down Expand Up @@ -51,6 +52,7 @@
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.4",
"typescript": "^5.5.3",
"vite": "^5.3.2"
"vite": "^5.3.2",
"vite-plugin-glsl": "^1.3.0"
}
}
1 change: 1 addition & 0 deletions apps/sandbox/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-glsl/ext" />
3 changes: 2 additions & 1 deletion apps/sandbox/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import glsl from "vite-plugin-glsl";

const projectDir = dirname(fileURLToPath(import.meta.url));
const rootDir = resolve(projectDir, "../..");
Expand All @@ -12,7 +13,7 @@ function examplePath(dirname: string) {

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), glsl()],
build: {
rollupOptions: {
input: {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
"author": "Hugues Tavernier",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.12.4",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@types/node": "^20.16.3",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-react-refresh": "^0.4.11",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3"
},
"volta": {
"node": "20.14.0"
},
"dependencies": {
"maplibre-react-components": "^0.1.5",
"maplibre-react-components": "^0.1.7",
"pentatrion-design": "^0.1.3"
}
}
Loading

0 comments on commit 7f036c2

Please sign in to comment.