This repository was archived by the owner on Aug 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Test Lighthouse Check with Minimum Score Enforcement
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ lighthouse-check :
10
+ runs-on : ubuntu-latest
11
+ continue-on-error : true
12
+ steps :
13
+ - uses : actions/checkout@master
14
+ - run : npm install
15
+ - name : Run Lighthouse
16
+ uses : foo-software/lighthouse-check-action@master
17
+ id : lighthouseCheck
18
+ with :
19
+ accessToken : ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
20
+ apiToken : " 5f8b9c5d94bddc0025bc528d_01cdb87c-1c48-4bf6-9729-a1c54fd55488"
21
+ urls : " 8fb3f66a-791d-4ff8-a419-149c7882d20a,https://dashboard.hacksc.com,https://odyssey.hacksc.com"
22
+ - name : Handle Lighthouse Check results
23
+ uses : foo-software/lighthouse-check-status-action@master
24
+ with :
25
+ commentUrl : " push"
26
+ lighthouseCheckResults : ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
27
+ minAccessibilityScore : " 0"
28
+ minBestPracticesScore : " 0"
29
+ minPerformanceScore : " 0"
30
+ minProgressiveWebAppScore : " 0"
31
+ minSeoScore : " 0"
Original file line number Diff line number Diff line change @@ -88,14 +88,17 @@ const Dashboard = ({
88
88
export async function getServerSideProps ( { req } ) {
89
89
const profile = await getProfile ( req ) ;
90
90
//const houses = await getHouses(req);
91
- const announcements = await getAnnouncements ( req , profile ) ;
91
+ let announcements = [ ] ;
92
+ if ( profile ) {
93
+ announcements = await getAnnouncements ( req , profile ) ;
94
+ }
92
95
const hackathonConstants = await getHackathonConstants ( ) ;
93
96
const currentEvents = await getPublicEvents ( req ) ;
94
97
const team = await getTeam ( req ) ;
95
98
const events = currentEvents ? currentEvents [ "events" ] : [ ] ;
96
99
97
100
const houses = [ ] ;
98
- const view = profile . role ;
101
+ const view = profile ? profile . role : null ;
99
102
100
103
// Null profile means user is not logged in
101
104
if ( ! profile ) {
You can’t perform that action at this time.
0 commit comments