Skip to content

Add Simple Speed Score #19

Add Simple Speed Score

Add Simple Speed Score #19

name: Deploy Pull Request
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
environment:
name: branch-deploy
url: ${{ steps.deploy.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm ci --prefer-offline
- run: npm run codegen
- run: npm run build
env:
VITE_COMMIT_REF: ${{ github.sha }}
VITE_CONTEXT: branch-deploy
VITE_GRAPHQL_URL: https://api.the-tricktionary.com
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- uses: FirebaseExtended/action-hosting-deploy@v0
id: deploy
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PROJECT_5641153190345267944 }}'
expires: 30d
projectId: project-5641153190345267944
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: branch-deploy
sourcemaps: ./dist
version_prefix: tricktionary-web-v4@