mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Create generate_stargazer_map.yml
This commit is contained in:
35
.github/workflows/generate_stargazer_map.yml
vendored
Normal file
35
.github/workflows/generate_stargazer_map.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Generate Stargazer Map
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # weekly
|
||||
|
||||
jobs:
|
||||
generate-map:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install requests geopy folium pycountry
|
||||
|
||||
- name: Run script
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: alexbelgium/hassio-addons
|
||||
run: python .github/generate_map.py
|
||||
|
||||
- name: Commit and push map
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add map/index.html
|
||||
git commit -m "Update stargazer map" || echo "No changes to commit"
|
||||
git push
|
||||
Reference in New Issue
Block a user