2
0
mirror of https://github.com/tycrek/degoogle synced 2024-11-12 01:11:03 +00:00
degoogle/.github/workflows/build.yml

39 lines
1.1 KiB
YAML
Raw Normal View History

2020-05-21 22:28:22 +00:00
name: Build
on:
push:
2020-05-21 22:38:47 +00:00
branches:
- master
paths: # Only build if these files were modified
- src/yaml/*.yml
- src/md/*.md
- src/_build.js
- src/_wiki.js
2020-05-21 22:28:22 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2020-05-21 22:28:22 +00:00
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
2020-05-21 22:28:22 +00:00
run: |
2020-05-24 00:36:32 +00:00
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
2020-06-02 21:20:31 +00:00
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}}