Get Docs PageSpeed results #1086
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> |