diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ca3a7307b..cb8e5e217 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -15,11 +15,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@v6 + uses: actions/checkout@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.2 + bundler-cache: true - name: Install dependencies run: | gem install bundler diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 000000000..204bc2368 --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,32 @@ +name: Lighthouse CI +on: + pull_request: + branches: + - main + +jobs: + lighthouse: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + + - name: Build Jekyll Site + run: | + gem install bundler + bundle install + bundle exec jekyll build + + - name: Run Lighthouse CI + uses: treosh/lighthouse-ci-action@12.1.0 + with: + configPath: './lighthouserc.json' + uploadArtifacts: true + temporaryPublicStorage: true + runs: 3 diff --git a/lighthouserc.json b/lighthouserc.json new file mode 100644 index 000000000..baedf86be --- /dev/null +++ b/lighthouserc.json @@ -0,0 +1,21 @@ +{ + "ci": { + "collect": { + "staticDistDir": "./_site", + "url": [ + "http://localhost/", + "http://localhost/events.html", + "http://localhost/projects/" + ] + }, + "assert": { + "preset": "lighthouse:no-pwa", + "assertions": { + "categories:performance": ["warn", {"minScore": 0.8}], + "categories:accessibility": ["warn", {"minScore": 0.8}], + "categories:seo": ["warn", {"minScore": 0.8}], + "categories:best-practices": ["warn", {"minScore": 0.8}] + } + } + } +}