refactor: use ci and PORT env

This commit is contained in:
Bart van der Braak 2023-10-01 21:09:56 +02:00 committed by GitHub
parent bd7f318514
commit c7df9c0d7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,15 +33,16 @@ jobs:
uses: actions/setup-node@v3.8.1
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm install --frozen-lockfile
run: npm ci
- name: Build production
run: npm run build
- name: Start Preview and Get Preview URL
run: npm run preview --port ${{ env.PORT }} & echo $! > preview_pid
run: PORT=${{ env.PORT }} npm run preview & echo $! > preview_pid
- name: Install Dependencies
run: npm add -g @unlighthouse/cli puppeteer