Skip to content

Commit

Permalink
Setup GitHub Pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
sankichi92 committed Dec 22, 2024
1 parent 640f4f4 commit 661e69c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pages

on:
push:
branches:
- main

jobs:
build-app:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.2.2

- uses: pnpm/action-setup@v4.0.0

- uses: actions/setup-node@v4.1.0
with:
node-version-file: package.json
cache: pnpm

- run: pnpm install

- name: Fetch TLE data
run: curl 'https://celestrak.org/NORAD/elements/gp.php?GROUP=last-30-days&FORMAT=tle' -o src/satellites.txt

- run: pnpm run build:app

- uses: actions/upload-pages-artifact@v3.0.1
with:
path: app

deploy:
needs: build-app

permissions:
pages: write
id-token: write

concurrency:
group: pages

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

runs-on: ubuntu-latest

steps:
- uses: actions/deploy-pages@v4.0.5
id: deployment
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dist-ssr
*.local

/types
/app
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build:app": "vite build --config vite.config.app.js",
"fmt": "prettier --write .",
"lint": "prettier --check ."
},
Expand Down
8 changes: 8 additions & 0 deletions vite.config.app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "vite";

export default defineConfig({
base: "/react-sat-map/",
build: {
outDir: "app",
},
});

0 comments on commit 661e69c

Please sign in to comment.