-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.31 KB
/
update-cotw.yml
File metadata and controls
42 lines (40 loc) · 1.31 KB
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
name: 'Update concept of the week'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: 'Checkout docs-update-cotw'
uses: actions/checkout@v5
- name: 'Checkout docs repo'
uses: actions/checkout@v5
with:
repository: 'Codecademy/docs'
path: 'docs'
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: 16
- uses: actions/cache@v4
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 "dev@codecademy.com"
git config user.name "codecademydev"
git add ./bin/concept-of-the-week.txt
git commit -m "🤖 update concept of the week"
git push
- uses: entepotenz/keep-github-actions-alive-min-dependencies@v1 # prevents github from disabling workflow after 60 days
on:
schedule:
- cron: '0 13 * * 0' # every sunday at 1:00pm UTC
workflow_dispatch: