Skip to content

Commit

Permalink
deploy to github pages and add lighthouse-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aferreira-deo committed Jun 10, 2024
1 parent dd188cd commit 6f1263c
Show file tree
Hide file tree
Showing 4 changed files with 4,293 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- cookie-ai-generated

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./src

- name: Wait for 20 seconds
run: sleep 20

- name: Install necessary packages
run: npm install

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v11
with:
urls: |
https://aferreira-deo.github.io/jftl-lighthouse-workshop/
configPath: './lighthouserc.js'
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
16 changes: 16 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
ci: {
collect: {
// url: ['http://192.168.1.2:8080'],
url: ['https://aferreira-deo.github.io/jftl-lighthouse-workshop/'],
},
assert: {
assertions: {
'categories:accessibility': ['error', {'minScore': 0.9}]
}
},
upload: {
target: 'temporary-public-storage',
},
},
};
Loading

0 comments on commit 6f1263c

Please sign in to comment.