refactor: scrape AlbionBB HTML pages for guild analytics data
This commit is contained in:
8 files changed
+241
-28
No files matched your search
@@ -5,6 +5,11 @@ on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
refresh_analytics:
|
||||
description: 'Refresh analytics by scraping AlbionBB pages (requires source-site access)'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
guild:
|
||||
description: 'Optional full Europe guild name to add to the static analytics data'
|
||||
required: false
|
||||
@@ -22,20 +27,20 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '24'
|
||||
- name: Verify content and behavior
|
||||
run: npm test
|
||||
- name: Restore published analytics datasets
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name == 'workflow_dispatch' && (inputs.refresh_analytics || inputs.guild != '')
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: public/data/intel
|
||||
key: intel-data-${{ github.run_id }}
|
||||
key: intel-data-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
restore-keys: intel-data-
|
||||
- name: Refresh static guild analytics
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name == 'workflow_dispatch' && (inputs.refresh_analytics || inputs.guild != '')
|
||||
run: npm run sync:intel
|
||||
env:
|
||||
INTEL_GUILD_NAME: ${{ inputs.guild }}
|
||||
- name: Verify content and behavior
|
||||
run: npm test
|
||||
- name: Download battle preview images
|
||||
if: github.event_name != 'pull_request'
|
||||
run: npm run sync:battles
|
||||
|
||||
Reference in new issue
Block a user