Fixes bar when between summer and fall semester #5208
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Build | |
on: | |
# Run on PR for CI purposes | |
pull_request: | |
# Run on push to our deployed branches for CD purposes | |
push: | |
branches: | |
- develop | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache npm files | |
uses: actions/cache@v3 | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: npm install | |
- name: Lint Files | |
run: npm run lint | |
- name: Build | |
run: npm run build | |
# Uncomment when ready to run tests | |
# - name: Test | |
# run: npm test | |
# Used to test deployment integration | |
# - name: Upload Build artifacts for testing | |
# if: ${{ github.ref == 'refs/heads/test-github-actions' }} | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: build-test | |
# path: build | |
- name: Upload develop build artifacts for deployment | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-train | |
path: dist | |
- name: Upload master build artifacts for deployment | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-prod | |
path: dist |