mirror of
https://github.com/Screenly/Anthias.git
synced 2025-12-23 22:38:05 -05:00
chore(ci): fix missing RPi Imager JSON URL (#2350)
This commit is contained in:
15
.github/workflows/deploy-website.yaml
vendored
15
.github/workflows/deploy-website.yaml
vendored
@@ -33,12 +33,25 @@ jobs:
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9'
|
||||
cache: 'pip'
|
||||
|
||||
- run: pip install requests==2.32.3
|
||||
|
||||
- name: Build website
|
||||
run: |
|
||||
cd website
|
||||
mkdir -p _site
|
||||
|
||||
# Copy in static files. This is to be migrated to Hugo later.
|
||||
# Build Raspberry Pi Imager JSON
|
||||
python ../raspberry_pi_imager/bin/build-pi-imager-json.py > _site/rpi-imager.json
|
||||
|
||||
# Make sure it's valid
|
||||
jq . < _site/rpi-imager.json
|
||||
|
||||
# Copy in static files.
|
||||
cp -rf assets _site/
|
||||
cp index.html _site/
|
||||
|
||||
|
||||
@@ -30,15 +30,16 @@ def get_asset_list(release_tag):
|
||||
)
|
||||
|
||||
for url in response.json()['assets']:
|
||||
if url['browser_download_url'].endswith('.zip'):
|
||||
asset_urls.append(url['browser_download_url'])
|
||||
download_url = url['browser_download_url']
|
||||
if download_url.endswith('.zst'):
|
||||
asset_urls.append(download_url)
|
||||
|
||||
return asset_urls
|
||||
|
||||
|
||||
def retrieve_and_patch_json(url):
|
||||
image_json = requests.get(
|
||||
url.replace('.zip', '.json'),
|
||||
url.replace('.img.zst', '.json'),
|
||||
headers=GITHUB_HEADERS
|
||||
).json()
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ To run the website locally:
|
||||
|
||||
```bash
|
||||
# Start the development server
|
||||
docker-compose -f docker-compose.website.yml up --build
|
||||
docker compose -f docker-compose.website.yml up --build
|
||||
|
||||
# The website will be available at:
|
||||
# http://localhost:8080
|
||||
@@ -21,4 +21,4 @@ website/
|
||||
├── assets/ # Static assets (images, styles)
|
||||
├── docker-compose.website.yml # Docker Compose file for local development
|
||||
└── index.html # Main website content
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user