Skip to content

chore(): update dependencies #181

chore(): update dependencies

chore(): update dependencies #181

Workflow file for this run

name: Client
on:
push:
branches: [main, master]
paths-ignore:
- 'functions/**'
- '.github/workflows/server.yml'
pull_request:
branches: [main, master]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency:
group: ${{ github.ref }}-client
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: Setup Bun Runtime
uses: antongolub/action-setup-bun@v1
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
key: client-${{ runner.os }} # Key is generic as for frequent package updates
- name: Install Dependencies
run: npm install
- name: Lint code
run: bun run lint
- name: Test code
run: bun run test:ci
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build project
run: bun run prerender
- name: Generate Sitemap
run: bun tools/sitemap-generator.js
- name: Generate Licenses File
run: npx -y npm-license-crawler --json dist/sign-translate/browser/licenses.json --onlyDirectDependencies --exclude ios --exclude android --exclude dist --exclude functions
- name: Archive dist
uses: actions/upload-artifact@v3
with:
name: build-dist
path: dist/sign-translate/browser/
retention-days: 1
lighthouse:
name: Lighthouse Test
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download built dist artifact
uses: actions/download-artifact@v3
with:
name: build-dist
path: dist/sign-translate/browser/
- name: Remove original html file from before prerendering
run: rm -f dist/sign-translate/browser/index.original.html || true
- name: Run Lighthouse against a static dist dir
uses: treosh/lighthouse-ci-action@v9
with:
configPath: .github/workflows/lighthouse/lighthouserc.json
uploadArtifacts: true
temporaryPublicStorage: true
website-deploy:
name: Deploy to Firebase
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download built dist artifact
uses: actions/download-artifact@v3
with:
name: build-dist
path: dist/sign-translate/browser/
# Experimentally, HTTP/2 Push degrades performance with prerendered pages
# - name: Create HTTP/2 Server Push Headers
# run: node tools/firebase-http-push.js
- name: Deploy Live Channel 🚀
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SIGN_MT }}
channelId: live
projectId: sign-mt
website-deploy-dev:
name: Deploy to Firebase
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download built dist artifact
uses: actions/download-artifact@v3
with:
name: build-dist
path: dist/sign-translate/browser/
- name: Deploy Development Channel 🚀
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SIGN_MT }}
projectId: sign-mt