-
Notifications
You must be signed in to change notification settings - Fork 16
44 lines (40 loc) · 1.42 KB
/
fetch_all_tutorials.yaml
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
name: Fetch all tutorials
on:
workflow_dispatch:
schedule:
#Every Sunday at 8:00 am
- cron: "0 8 * * 0"
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "tutorials"
cancel-in-progress: false
permissions:
contents: write
jobs:
fetch-all-tutorials:
runs-on: ubuntu-20.04
environment: fetch-tutorials
name: Fetch all tutorials
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Run script #needs PAT to access other repos
run: |
bash ./bin/extract_all_tutorials.sh
env:
PLAUSIBLE_API_KEY: ${{ secrets.PLAUSIBLE_API_TOKEN }}
- name: Commit all tools
# add or commit any changes in results if there was a change, merge with main and push as bot
run: |
git config user.name github-actions
git config user.email [email protected]
git pull --no-rebase -s recursive -X ours
git add results
git status
git diff --quiet && git diff --staged --quiet || (git commit -m "fetch all tutorials bot - step fetch")
git push