-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (73 loc) · 2.25 KB
/
deploy.yml
File metadata and controls
92 lines (73 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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@v6
- 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@v7
- 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@v6
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@v6
- 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