-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.29 KB
/
screenshot.yml
File metadata and controls
51 lines (42 loc) · 1.29 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
43
44
45
46
47
48
49
50
51
name: Screenshot
on:
push:
branches: [master]
workflow_dispatch:
jobs:
screenshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- name: Set up git
run: |
git config --local user.email "actions@github.com"
git config --local user.name "Github Actions"
git config pull.rebase false
git pull
# Sleep to ensure the github pages deploy is done, by the time the screenshot gets captured.
- name: Sleep 30 Seconds
run: sleep 30s
- name: Remove old Screenshot
continue-on-error: true
run: rm screenshot.png
- name: Capture Screenshot
uses: JonathanTreffler/full-website-screenshot-action@v1.0
with:
url: https://algorithmik.online
destination: ./screenshot.png
- name: Commit files
continue-on-error: true
run: |
ls -la
git pull
git add screenshot.png
git commit -m "Updated the Screenshot" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master