Run parser #47128
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 parser | |
on: | |
schedule: | |
- cron: '*/10 * * * *' # Every 10 minutes | |
workflow_dispatch: | |
permissions: | |
roles: | |
# A special role to limit who can deploy stuff - see https://github.com/orgs/StampyAI/teams/deployers | |
- StampyAI/deployers | |
inputs: | |
force-parse: | |
description: 'Whether to force a reparse of all answers' | |
type: choice | |
options: | |
- false | |
- true | |
env: | |
CODA_TOKEN: ${{ secrets.CODA_TOKEN }} | |
GCLOUD_CREDENTIALS: ${{ secrets.GCLOUD_CREDENTIALS }} | |
DISCORD_ERROR: ${{ secrets.DISCORD_ERROR }} | |
DISCORD_FEED: ${{ secrets.DISCORD_FEED }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
jobs: | |
run-parser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: npm install | |
- name: Run the parser | |
run: PARSE_ALL=${{inputs.force-parse}} node bin/importContent.js |