File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Remote Publish to Reddit
2+
3+ on :
4+ # Allows manual triggering from any device (GitHub Web or App)
5+ workflow_dispatch :
6+ # Optional: Uncomment to publish automatically every time you push a new blog post
7+ # push:
8+ # paths:
9+ # - 'content/blog/**'
10+
11+ jobs :
12+ publish :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout Repository
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Setup Node.js
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : ' 20'
25+ cache : ' npm'
26+
27+ - name : Install Dependencies
28+ run : npm install snoowrap dotenv gray-matter
29+
30+ - name : Run Auto-Publisher
31+ env :
32+ REDDIT_CLIENT_ID : ${{ secrets.REDDIT_CLIENT_ID }}
33+ REDDIT_CLIENT_SECRET : ${{ secrets.REDDIT_CLIENT_SECRET }}
34+ REDDIT_USERNAME : ${{ secrets.REDDIT_USERNAME }}
35+ REDDIT_PASSWORD : ${{ secrets.REDDIT_PASSWORD }}
36+ REDDIT_SUBREDDITS : ' webdev,programming,javascript,sideproject'
37+ DOMAIN : ' https://wtkpro.site'
38+ run : node scripts/publish-reddit.mjs
You can’t perform that action at this time.
0 commit comments