-
Notifications
You must be signed in to change notification settings - Fork 100
42 lines (41 loc) · 1.26 KB
/
update-screenshots.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
name: 'Update Screenshots'
on:
workflow_dispatch:
#pull_request:
# types: [closed]
schedule:
- cron: '1 12 * * *'
jobs:
UpdateSiteStatus:
if: (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: windows-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Set up node 16.x'
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: 'npm'
- name: 'Install dependencies'
run: npm ci
working-directory: scripts
- name: 'Run update screenshots script'
timeout-minutes: 10
run: node update-screenshots
id: node
env:
UA_KEY: ${{ secrets.UA_KEY }}
working-directory: scripts
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "argon-theme-bot"
git add -A
git commit -m "Update screenshots" -a
git pull --rebase origin master
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN_ARGON_BOT }}