diff --git a/.github/workflows/lighthouse-badges.yml b/.github/workflows/lighthouse-badges.yml index d2ac2e3d26..b8ad53c0cd 100644 --- a/.github/workflows/lighthouse-badges.yml +++ b/.github/workflows/lighthouse-badges.yml @@ -4,28 +4,30 @@ on: workflow_dispatch jobs: lighthouse-badger-easy: - runs-on: ubuntu-22.04 - timeout-minutes: 8 + runs-on: ubuntu-latest env: - URLS: 'https://tiagoporto.github.io/svg-music-logos' - TOKEN_NAME: # target token name; insert only the name never the real value e.g. 'LIGHTHOUSE_BADGER_TOKEN' - REPO_BRANCH: '${{ github.repository }} badge' + URL: 'https://tiagoporto.github.io/svg-music-logos' steps: - - name: Preparatory Tasks - run: | - REPOSITORY=`expr "${{ env.REPO_BRANCH }}" : "\([^ ]*\)"` - BRANCH=`expr "${{ env.REPO_BRANCH }}" : ".* \([^ ]*\)"` - echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV - echo "BRANCH=$BRANCH" >> $GITHUB_ENV - - uses: actions/checkout@v4 - with: - repository: ${{ env.REPO_BRANCH }} - token: ${{ secrets[env.TOKEN_NAME] }} - ref: ${{ env.REPO_BRANCH }} - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: - repository: 'myactionway/lighthouse-badges' - path: temp_lighthouse_badges_nested - - uses: myactionway/lighthouse-badger-action@v2.2 + ref: ${{ github.head_ref }} + + - name: Setup node + uses: actions/setup-node@v4 with: - urls: ${{ env.URLS }} + node-version-file: '.nvmrc' + + - name: Install Dependencies + run: npm ci --ignore-scripts + + - name: Generate badges + run: npm run lighthouse-badge + + - name: Commit changes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add docs/pagespeed.svg + git commit -m "Add pagespeed badge" + git push diff --git a/README.md b/README.md index 8dca89c057..df5d0296e0 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Listen on: ## Status ✅ +![Pagespeed insights](./docs/pagespeed.svg) + [![Website](https://img.shields.io/website/https/tiagoporto.github.io/svg-music-logos.svg?down_color=lightgrey\&down_message=offline\&style=flat-square\&up_message=online)](https://tiagoporto.github.io/svg-music-logos) [![W3C Validation](https://img.shields.io/w3c-validation/html.svg?style=flat-square\&targetUrl=https://tiagoporto.github.io/svg-music-logos)](https://validator.nu/?doc=https%3A%2F%2Ftiagoporto.github.io%2Fsvg-music-logos) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/tiagoporto/svg-music-logos/ci.yml?label=checks\&style=flat-square)](https://github.com/tiagoporto/svg-music-logos/actions/workflows/ci.yml)