From b277174334a5944503e6c030ad07c7336cfd7fba Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:15:37 -0400 Subject: [PATCH 01/15] Starting a github actions --- .github/workflows/jekyll.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/jekyll.yml diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 00000000..34a15fbe --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,33 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Jekyll Build + +on: + push: + branches: [ develop, master ] + pull_request: + branches: [ develop, master ] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.6', '2.7', '3.0'] + node-version: ['14'] + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec jekyll build From bce81eb5ec07f46214420aa808740f07a848d8de Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:17:42 -0400 Subject: [PATCH 02/15] Only using 2.x --- .github/workflows/jekyll.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 34a15fbe..4239285a 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0'] + ruby-version: ['2.6', '2.7'] node-version: ['14'] steps: From 801796eddd95fdc680821489b94ab7e73ddf8415 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:37:26 -0400 Subject: [PATCH 03/15] Adding lighthouse check --- .github/workflows/jekyll.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 4239285a..53a127b8 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -29,5 +29,14 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Run tests + - name: Run build run: bundle exec jekyll build + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm install -g firebase-tools + - run: firebase deploy --token ${{ secrets.FirebaseToken }} --non-interactive + - run: npm run lh --perf=85 --a11y=85 --bp=85 --seo=85 https://csh-public-site.web.app From 0c9208255ecb8550033e163b5a57e17610913e2d Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:42:02 -0400 Subject: [PATCH 04/15] Adding artifacts This might not work? --- .github/workflows/jekyll.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 53a127b8..8c2f1902 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -29,6 +29,10 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - uses: actions/upload-artifact@master + with: + name: site + path: _site - name: Run build run: bundle exec jekyll build - uses: actions/checkout@v2 @@ -36,6 +40,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - uses: actions/download-artifact@master + with: + name: site + path: _site - run: npm install - run: npm install -g firebase-tools - run: firebase deploy --token ${{ secrets.FirebaseToken }} --non-interactive From 30b4b6db56d0ea23bbdf3817f7f40d978183c558 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:43:12 -0400 Subject: [PATCH 05/15] Moving artifact upload --- .github/workflows/jekyll.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 8c2f1902..3b685877 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -29,12 +29,12 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run build + run: bundle exec jekyll build - uses: actions/upload-artifact@master with: name: site path: _site - - name: Run build - run: bundle exec jekyll build - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 From 9427d505b71423c36b9c8d614c309d14339b1908 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:48:36 -0400 Subject: [PATCH 06/15] Using lighthouse-ci --- .github/workflows/jekyll.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 3b685877..91c86d3b 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -8,8 +8,6 @@ name: Jekyll Build on: - push: - branches: [ develop, master ] pull_request: branches: [ develop, master ] @@ -47,4 +45,12 @@ jobs: - run: npm install - run: npm install -g firebase-tools - run: firebase deploy --token ${{ secrets.FirebaseToken }} --non-interactive - - run: npm run lh --perf=85 --a11y=85 --bp=85 --seo=85 https://csh-public-site.web.app + - uses: actions/checkout@v2 + - name: Audit URLs using Lighthouse + uses: treosh/lighthouse-ci-action@v7 + with: + urls: https://csh-public-site.web.app + budgetPath: ./budget.json # test performance budgets + uploadArtifacts: true # save results as an action artifacts + temporaryPublicStorage: true # upload lighthouse report to the temporary storage + From a0427b6272a107d0d3544ab8e5406510115b6682 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:53:51 -0400 Subject: [PATCH 07/15] Clean up titles --- .github/workflows/jekyll.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 91c86d3b..9024b1d9 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -27,14 +27,14 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Run build + - name: Run jekyll build run: bundle exec jekyll build - uses: actions/upload-artifact@master with: name: site path: _site - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Setup Node uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} @@ -46,7 +46,7 @@ jobs: - run: npm install -g firebase-tools - run: firebase deploy --token ${{ secrets.FirebaseToken }} --non-interactive - uses: actions/checkout@v2 - - name: Audit URLs using Lighthouse + - name: Audit PR using Lighthouse uses: treosh/lighthouse-ci-action@v7 with: urls: https://csh-public-site.web.app From 313a0768d428389410abed80b040bbab3bdf4285 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 10:54:29 -0400 Subject: [PATCH 08/15] Adding budget --- budget.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 budget.json diff --git a/budget.json b/budget.json new file mode 100644 index 00000000..6506dcd0 --- /dev/null +++ b/budget.json @@ -0,0 +1,15 @@ +[ + { + "path": "/*", + "resourceSizes": [ + { + "resourceType": "document", + "budget": 18 + }, + { + "resourceType": "total", + "budget": 200 + } + ] + } +] From 42ca6c2e3a1fb24388d02ec77baedeb492245303 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:04:31 -0400 Subject: [PATCH 09/15] Updating for better budget --- budget.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/budget.json b/budget.json index 6506dcd0..97e9ff8b 100644 --- a/budget.json +++ b/budget.json @@ -1,14 +1,14 @@ [ { "path": "/*", - "resourceSizes": [ + "timings": [ { - "resourceType": "document", - "budget": 18 + "metric": "interactive", + "budget": 5000 }, { - "resourceType": "total", - "budget": 200 + "metric": "first-meaningful-paint", + "budget": 3000 } ] } From 648fedb9db32c0d3b854e943b54131b184899ae8 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:08:22 -0400 Subject: [PATCH 10/15] Removing budget and cleaning up package --- budget.json | 15 --------------- package.json | 4 +--- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 budget.json diff --git a/budget.json b/budget.json deleted file mode 100644 index 97e9ff8b..00000000 --- a/budget.json +++ /dev/null @@ -1,15 +0,0 @@ -[ - { - "path": "/*", - "timings": [ - { - "metric": "interactive", - "budget": 5000 - }, - { - "metric": "first-meaningful-paint", - "budget": 3000 - } - ] - } -] diff --git a/package.json b/package.json index 7b822fc1..2b56e608 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,7 @@ "description": "The public facing website for [Rochester Institute of Technology](https://rit.edu/)'s [Computer Science House](https://csh.rit.edu).", "main": "_site/index.html", "dependencies": {}, - "devDependencies": { - "lighthousebot": "git+https://github.com/ebidel/lighthousebot.git" - }, + "devDependencies": {}, "scripts": { "lh": "lighthousebot" }, From fc901fe8bc88db99f658e777f54e304498d66a06 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:08:37 -0400 Subject: [PATCH 11/15] Removing travis --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ac3822d5..00000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: node_js -node_js: - - "12.6" -before_install: - - rvm install 2.6.3 -install: - - gem install bundler - - npm install -before_script: - - bundle install - - npm install -g firebase-tools -script: - - bundle exec jekyll build -after_success: - - firebase deploy --token $FIREBASE_TOKEN --non-interactive - - npm run lh --perf=85 --a11y=85 --bp=85 --seo=85 https://csh-public-site.web.app From 10bccc16daa2567227c25ed4f220191bddab1767 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:11:21 -0400 Subject: [PATCH 12/15] Moving to just jekyll build on PR --- .github/workflows/jekyll.yml | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 9024b1d9..c0344b39 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -12,13 +12,12 @@ on: branches: [ develop, master ] jobs: - test: + jekyll-build: runs-on: ubuntu-latest strategy: matrix: ruby-version: ['2.6', '2.7'] - node-version: ['14'] steps: - uses: actions/checkout@v2 @@ -29,28 +28,4 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run jekyll build run: bundle exec jekyll build - - uses: actions/upload-artifact@master - with: - name: site - path: _site - - uses: actions/checkout@v2 - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - uses: actions/download-artifact@master - with: - name: site - path: _site - - run: npm install - - run: npm install -g firebase-tools - - run: firebase deploy --token ${{ secrets.FirebaseToken }} --non-interactive - - uses: actions/checkout@v2 - - name: Audit PR using Lighthouse - uses: treosh/lighthouse-ci-action@v7 - with: - urls: https://csh-public-site.web.app - budgetPath: ./budget.json # test performance budgets - uploadArtifacts: true # save results as an action artifacts - temporaryPublicStorage: true # upload lighthouse report to the temporary storage From 1b15c99aa8833c53fe981cab102e28da9e8b0f7e Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:13:40 -0400 Subject: [PATCH 13/15] Adding lighthouse job --- .github/workflows/lighthouse.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/lighthouse.yml diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 00000000..dfbb5012 --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,18 @@ + +name: Lighthouse Performance + +on: + pull_request: + branches: [ master ] + +jobs: + lighthouse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Audit develop using Lighthouse + uses: treosh/lighthouse-ci-action@v7 + with: + urls: https://wwwtest.csh.rit.edu + uploadArtifacts: true + temporaryPublicStorage: true From 2bad1312c3ef32449a9d3e5a81ceaf05f45b5e74 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:19:23 -0400 Subject: [PATCH 14/15] Adding back budgets --- .github/workflows/lighthouse.yml | 1 + budget.json | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 budget.json diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index dfbb5012..85b9abb8 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -14,5 +14,6 @@ jobs: uses: treosh/lighthouse-ci-action@v7 with: urls: https://wwwtest.csh.rit.edu + budgetPath: ./budget.json uploadArtifacts: true temporaryPublicStorage: true diff --git a/budget.json b/budget.json new file mode 100644 index 00000000..ba86149a --- /dev/null +++ b/budget.json @@ -0,0 +1,15 @@ +[ + { + "path": "/*", + "timings": [ + { + "metric": "speed-index", + "budget": 10000 + }, + { + "metric": "interactive", + "budget": 8000 + } + ] + } +] From 32e79f32f357b9a68cf1ff4cefce658f67c43424 Mon Sep 17 00:00:00 2001 From: Devin Matte Date: Thu, 6 May 2021 11:21:50 -0400 Subject: [PATCH 15/15] Cleaning up scripts --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 2b56e608..99d17f45 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,7 @@ "main": "_site/index.html", "dependencies": {}, "devDependencies": {}, - "scripts": { - "lh": "lighthousebot" - }, + "scripts": {}, "repository": { "type": "git", "url": "git+https://github.com/ComputerScienceHouse/CSHPublicSite.git"