Skip to content

fix warning

fix warning #17

Workflow file for this run

name: Deploy React to GitHub Pages
on:
push:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sfeos-web # ← ADD THIS
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: ./sfeos-web/package-lock.json # ← Optional but helps
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
REACT_APP_MAPTILER_KEY: ${{ secrets.MAPTILER_KEY }}
REACT_APP_STAC_API_URL: https://landsatlook.usgs.gov/stac-server
- name: Fix SPA routing
run: cp build/index.html build/404.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./sfeos-web/build # ← Point to subfolder
- name: Deploy
uses: actions/deploy-pages@v4