forked from MapComplete/MapComplete
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 2 * * *"
|
|
|
|
jobs:
|
|
create_community_index:
|
|
runs-on: [ ubuntu-latest, hetzner-access ]
|
|
steps:
|
|
- uses: https://source.mapcomplete.org/actions/checkout@v4
|
|
- uses: ./.forgejo/setup
|
|
|
|
- name: create community index files
|
|
shell: bash
|
|
run: npm run download:community-index -- -- community-index/
|
|
|
|
- name: upload community index
|
|
shell: bash
|
|
run: |
|
|
zip community-index.zip community-index/*
|
|
scp community-index.zip hetzner:data/
|
|
ssh hetzner "cd data && rm -rf community-index/ && unzip community-index.zip && rm community-index.zip"
|
|
|
|
update_statistics:
|
|
runs-on: [ ubuntu-latest, hetzner-access ]
|
|
steps:
|
|
- uses: https://source.mapcomplete.org/actions/checkout@v4
|
|
- uses: ./.forgejo/setup
|
|
|
|
- name: Update statistics
|
|
shell: bash
|
|
run: |
|
|
scp -r hetzner:~/data/changeset-metadata/ .
|
|
npm run download:stats -- -- ./
|
|
scp -r ./changeset-metadata/* hetzner:~/data/changeset-metadata/
|
|
|