Skip to content

Run OSRS Web Scraper #241

Run OSRS Web Scraper

Run OSRS Web Scraper #241

name: Run OSRS Web Scraper
on:
workflow_dispatch:
inputs:
task:
description: "Task to run"
required: true
default: "news"
type: choice
options:
- news
- poll
- worlds
link:
description: "Link"
required: false
jobs:
scrapeNews:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: OSRS Web Scraper
run: npm run start:node ${{ github.event.inputs.task }} "${{ github.event.inputs.link }}"
- name: Upload Output
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.inputs.task }}-${{ github.run_id }}-${{ github.run_attempt }}
path: out/${{ github.event.inputs.task }}/