mirror of
https://github.com/tycrek/degoogle
synced 2024-11-10 01:13:40 +00:00
34218f041b
Co-authored-by: amo13 <amaury@mailbox.org> Co-authored-by: Matthew Wise <matthew.rs.wise@gmail.com> Co-authored-by: Mark Niehe <mark.niehe@segment.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Degoogle Bot <dg-bot-push@tycrek.com>
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
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}}
|