Skip to content

Commit

Permalink
Add GitHub Actions workflows for fandom-cron.
Browse files Browse the repository at this point in the history
  • Loading branch information
KockaAdmiralac committed Aug 27, 2024
1 parent 04778a2 commit 6835711
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/dump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Dump all wiki databases

on:
schedule:
- cron: '43 0 * * *'
workflow_dispatch:

jobs:
dump:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
working-directory: ./fandom-cron
run: npm install
- name: Set configuration
working-directory: ./fandom-cron
run: echo '${{ secrets.DUMP_CONFIG }}' > dump.json
- name: Set cookies
working-directory: ./fandom-cron
run: echo '${{ secrets.DUMP_COOKIES }}' > fandom.cookies
- name: Dump the databases
working-directory: ./fandom-cron
run: node dump.js
26 changes: 26 additions & 0 deletions .github/workflows/highlight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update Highlight.css

on:
schedule:
- cron: '36 0 * * *'
workflow_dispatch:

jobs:
highlight:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
working-directory: ./fandom-cron
run: npm install
- name: Set configuration
working-directory: ./fandom-cron
run: echo '${{ secrets.HIGHLIGHT_CONFIG }}' > highlight.json
- name: Update Highlight.css
working-directory: ./fandom-cron
run: node highlight.js

0 comments on commit 6835711

Please sign in to comment.