-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1.25 KB
/
update-cotw.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
name: 'Update concept of the week'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
repository: 'Codecademy/docs'
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
path: 'docs'
- uses: actions/setup-node@v2
with:
cache: 'yarn'
node-version: 16
- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-node-16-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies If Not Cached
run: \[ -d node_modules \] || yarn install --frozen-lockfile
shell: bash
- run: yarn update-cotw
shell: bash
- name: 'Commit changes'
run: |
cd docs
git config user.email "[email protected]"
git config user.name "codecademydev"
git add ./bin/concept-of-the-week.txt
git commit -m "🤖 update concept of the week"
git push
- uses: gautamkrishnar/keepalive-workflow@v1 # prevents github from disabling workflow after 60 days
on:
schedule:
- cron: '0 13 * * 0' # every sunday at 1:00pm UTC