Run OSRS Web Scraper #241
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}/ |