Skip to content

Update Satellite Data and Deploy #20

Update Satellite Data and Deploy

Update Satellite Data and Deploy #20

Workflow file for this run

name: Update Satellite Data and Deploy
on:
schedule:
# Run daily at 2 AM UTC
- cron: "0 2 * * *"
workflow_dispatch: # Allow manual triggering
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
update-satellite-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: "scripts/.python-version"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y tippecanoe
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Python dependencies
working-directory: scripts
run: uv sync
- name: Validate constellation files
working-directory: scripts
run: uv run python validate_satellites.py
- name: Generate satellite data
working-directory: scripts
run: uv run python generate_satellite_paths.py
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: "20"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Install frontend dependencies
run: pnpm install
- name: Build site
run: pnpm build
- name: Commit updated satellite metadata
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add public/satellite_paths_metadata.json
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update satellite data metadata (daily update)"
git push
fi
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v4
with:
path: dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4