-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.4 KB
/
deploy-preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- 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@