Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Merge pull request #519 from tycrek/please-work #210

Merge pull request #519 from tycrek/please-work

Merge pull request #519 from tycrek/please-work #210

Workflow file for this run

name: Build
on:
push:
branches:
- master
paths: # Only build if these files were modified
- src/yaml/*.yml
- src/md/*.md
- src/_build.js
- src/_wiki.js
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# GH_PAT must be a PAT for repo owner
token: ${{ secrets.GH_PAT }}
- uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Build README
run: npm i && node src/_build.js
- name: Commit & Push
# GH_NAME/GH_EMAIL can be any collaborator account with Force Push access
run: |
git add README.md
git config --local user.name "${{ vars.GH_NAME }}"
git config --local user.email "${{ vars.GH_EMAIL }}"
git commit --allow-empty -m "Generated README.md"
git push --force-with-lease
- name: Publish Reddit Wiki
run: node src/_wiki.js
env:
REDDIT_USER: ${{ secrets.REDDIT_USER}}
REDDIT_PASS: ${{ secrets.REDDIT_PASS}}
REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID}}
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET}}