MapComplete/.forgejo/workflows/monthly_data_maintenance.yml

31 lines
930 B
YAML

on:
workflow_dispatch:
schedule:
- cron: "0 2 1 * *"
jobs:
monthly_data_maintenance:
runs-on: [ ubuntu-latest, hetzner-access ]
steps:
- uses: https://source.mapcomplete.org/actions/checkout@v4
- uses: ./.forgejo/snippets/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"
- name: Update statistics
shell: bash
run: |
scp -r hetzner:~/data/changeset-metadata/ .
npm run download:stats -- -- ./
scp -r ./changeset-metadata/* hetzner:~/data/changeset-metadata/