Skip to content

Update site data

Update site data #2223

Workflow file for this run

name: Update site data
on:
workflow_dispatch:
inputs:
force_update:
description: 'Force update all sites'
required: false
type: boolean
default: false
schedule:
- cron: "1 0 * * *"
push:
branches:
- main
jobs:
update:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: "wonderfulsoftware/webring-site-data"
ssh-key: ${{ secrets.WEBRING_SITE_DATA_DEPLOY_KEY }}
path: tmp/webring-site-data
- uses: actions/checkout@v2
with:
repository: "wonderfulsoftware/webring-site-screenshots"
ssh-key: ${{ secrets.WEBRING_SITE_SCREENSHOTS_DEPLOY_KEY }}
path: tmp/webring-site-screenshots
- uses: actions/setup-node@v1
with:
node-version: 22.x
# Build and run site-fetcher locally
- name: Run site-fetcher Docker container
uses: ./.github/actions/site-fetcher-docker
- run: yarn
- run: node automation/site-updater
env:
FORCE_UPDATE: ${{ github.event.inputs.force_update == 'true' && '1' || '' }}
- run: node automation/feed-updater
- name: Display site-fetcher logs
if: always()
run: docker logs site-fetcher || true
- name: Stop site-fetcher container
run: docker stop site-fetcher || true
- run: cd tmp/webring-site-screenshots && git add -A && (git commit -m "$(cat ../webring-site-screenshots-commit-message)" || true) && git push
env:
GIT_COMMITTER_NAME: GitHub Actions
GIT_AUTHOR_NAME: GitHub Actions
EMAIL: github-actions[bot]@users.noreply.github.com
- run: cd tmp/webring-site-data && git add -A && (git commit -m "$(cat ../webring-site-data-commit-message)" || true) && git push
env:
GIT_COMMITTER_NAME: dtinth-bot
GIT_AUTHOR_NAME: dtinth-bot
EMAIL: dtinth-bot@users.noreply.github.com