Skip to content

Update Screenshots #1032

Update Screenshots

Update Screenshots #1032

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 }}