-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.28 KB
/
solve-daily.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
36
37
38
39
40
41
42
43
44
45
46
47
name: solve-daily
on:
# run automatically every day at 9:00 AM
# schedule:
# - cron: "0 9 * * *"
# allows to manually run the job at any time
workflow_dispatch:
jobs:
solve-daily:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 6
- uses: actions/setup-node@v2
with:
node-version: 16
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: cache word list
uses: actions/cache@v2
with:
path: node_modules/wordList-cache.txt
key: wordList-cache
restore-keys: wordList-cache
- run: pnpm twitter-refresh
env:
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
TWITTER_CLIENT_ID: ${{ secrets.TWITTER_CLIENT_ID }}
TWITTER_CLIENT_SECRET: ${{ secrets.TWITTER_CLIENT_SECRET }}
TWITTER_REFRESH_TOKEN: ${{ secrets.TWITTER_REFRESH_TOKEN }}
- run: pnpm start
timeout-minutes: 2
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
# the fresh access token is read from the .env file created by the previous step