-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (68 loc) · 2.22 KB
/
cron.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Fetch new plugins and Themes
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
fetch-plugins:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4.3.0
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ${GITHUB_WORKSPACE}/bin/requirements.txt
- name: Fetch plugins
run: |
python ${GITHUB_WORKSPACE}/bin/fetch_packages.py plugins
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: ${{ github.actor }}
- name: Commit files
run: |
echo ${{ github.ref }}
git pull
git add .
git config --local user.email "github-actions@github.com"
git config --local user.name "github-actions"
git commit -m "AUTOMATED: fetch new vuepress themes and plugins" -a | exit 0
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}
fetch-themes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4.3.0
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ${GITHUB_WORKSPACE}/bin/requirements.txt
- name: Fetch themes
run: |
python ${GITHUB_WORKSPACE}/bin/fetch_packages.py themes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: ${{ github.actor }}
- name: Commit files
run: |
echo ${{ github.ref }}
git pull
git add .
git config --local user.email "github-actions@github.com"
git config --local user.name "github-actions"
git commit -m "AUTOMATED: fetch new vuepress themes and themes" -a | exit 0
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}