forked from AlexRogalskiy/android-patterns
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 1.3 KB
/
pagespeed.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
name: Get Docs PageSpeed results
on:
workflow_dispatch:
schedule:
- cron: "0 0 */1 * *" # each day at 00:00 UTC
jobs:
docs-page-speed:
env:
HOST: https://alexander-rogalsky.gitbook.io/android-patterns/
PSURL: https://pagespeed-insights.herokuapp.com
PSRDESKTOP: pagespeedresult
PSRMOBILE: pagespeedresultmobile
RESULTSFOLDER: reports
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Create local changes
run: | # Have to be sure a folder is present if not, make it
mkdir -p ${RESULTSFOLDER}
curl "${PSURL}/?url=${HOST}" > ./${RESULTSFOLDER}/${PSRDESKTOP}.svg
curl "${PSURL}/?url=${HOST}&strategy=mobile" > ./${RESULTSFOLDER}/${PSRMOBILE}.svg
- name: Commit update
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
skip_dirty_check: true
commit_message: "docs: updates on docs page speed\n\n Added docs page speed information on news"
commit_options: '--no-verify --signoff'
commit_user_name: GitHub Bot
commit_user_email: [email protected]
commit_author: GitHub Bot <[email protected]>