Lighthouse CI #43
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: Lighthouse CI | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [pages-build-deployment] | |
types: | |
- completed | |
env: | |
URL: https://www.esna.cloud | |
jobs: | |
lighthouseci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm install -g @lhci/cli | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- run: | | |
git branch | |
echo "LHCI_BUILD_CONTEXT__CURRENT_HASH=$(git log -1 --pretty=format:\"%H\")" >> $GITHUB_ENV | |
echo LHCI_BUILD_CONTEXT__CURRENT_HASH=$LHCI_BUILD_CONTEXT__CURRENT_HASH | |
- run: lhci collect --url=$URL --collect.numberOfRuns=5 | |
- run: lhci upload --target=temporary-public-storage | |
env: | |
LHCI_GITHUB_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} |