-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (55 loc) · 1.79 KB
/
lint-deploy.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
46
47
48
49
50
51
52
53
54
55
56
57
58
# .github/workflows/netlify.yml
name: Build and Deploy to Netlify
on:
pull_request:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm run lint
- run: |
cat <<EOF > ./backend/.env
OPENVIDU_URL=${{ secrets.OPENVIDU_URL }}
OPENVIDU_SECRET=${{ secrets.OPENVIDU_SECRET }}
EOF
- run: cat backend/.env
- run: cd backend && npm ci && npm run build
env:
RICOCHET_SITE_KEY: ${{ secrets.RICOCHET_SECRET_KEY }}
- run: npm run build
env:
VITE_API_ENDPOINT: /api
VITE_SOCKET_URL: https://public.jeremiez.net/
VITE_SOCKET_PATH: /wamp2/socket.io
VITE_RICOCHET_SITEID: airboardgame
VITE_USE_PROXY: 0
VITE_WEBCONFERENCE: audio
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
VITE_ENVIRONMENT: production
CYPRESS_INSTALL_BINARY: 0
- run: |
cat <<EOF > ./dist/_redirects
/api/* https://ricochetjs-deploy-production.up.railway.app/:splat 200
/* /index.html 200
EOF
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: './dist'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1