-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.33 KB
/
send_new_word_notification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Send new word notification
on:
deployment_status
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
TWITTER_CLIENT_APP_KEY: ${{ secrets.TWITTER_CLIENT_APP_KEY }}
TWITTER_CLIENT_APP_SECRET: ${{ secrets.TWITTER_CLIENT_APP_SECRET }}
TWITTER_CLIENT_ACCESS_TOKEN: ${{ secrets.TWITTER_CLIENT_ACCESS_TOKEN }}
TWITTER_CLIENT_ACCESS_SECRET: ${{ secrets.TWITTER_CLIENT_ACCESS_SECRET }}
REDDIT_USER_AGENT: ${{ secrets.REDDIT_USER_AGENT }}
REDDIT_CLIENT_ID: ${{ secrets.REDDIT_CLIENT_ID }}
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
REDDIT_USERNAME: ${{ secrets.REDDIT_USERNAME }}
REDDIT_PASSWORD: ${{ secrets.REDDIT_PASSWORD }}
jobs:
changed_files:
if: github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'Production'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: './words/**'
since_last_remote_commit: 'true'
- name: Install
run: |
npm ci
- name: Send notification
run: |
npm run new-word-notification ${{ steps.changed-files.outputs.added_files }}