Monthly Coupon Distribution #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Monthly Coupon Distribution" | |
on: | |
schedule: | |
- cron: '1 1 1 * *' | |
jobs: | |
distribute: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check out Git repository" | |
uses: actions/checkout@v2 | |
- name: "Use Node.js 16" | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: "Install latest published module from NPM" | |
run: npm i -g juicy-coupon-bot | |
- name: "Activate publishing mode" | |
run: | | |
echo "PUBLISHING_MODE=true" >> $GITHUB_ENV | |
- name: "Distribute coupons" | |
run: juicy-coupon-bot | |
env: | |
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
FACEBOOK_APP_SECRET: ${{ secrets.FACEBOOK_APP_SECRET }} | |
FACEBOOK_ACCESS_TOKEN: ${{ secrets.FACEBOOK_ACCESS_TOKEN }} | |
REDDIT_ACCOUNT_NAME: ${{ secrets.REDDIT_ACCOUNT_NAME }} | |
REDDIT_ACCOUNT_PASSWORD: ${{ secrets.REDDIT_ACCOUNT_PASSWORD }} | |
REDDIT_APP_ID: ${{ secrets.REDDIT_APP_ID }} | |
REDDIT_APP_SECRET: ${{ secrets.REDDIT_APP_SECRET }} |