airboardgame/.github/workflows/lint-deploy.yml

59 lines
1.8 KiB
YAML
Raw Normal View History

2021-04-18 09:50:01 +02:00
# .github/workflows/netlify.yml
name: Build and Deploy to Netlify
on:
pull_request:
2021-04-24 15:27:04 +02:00
push:
workflow_dispatch:
2021-04-18 09:50:01 +02:00
jobs:
build:
runs-on: ubuntu-20.04
steps:
2022-10-17 12:12:17 +02:00
- uses: actions/checkout@v3
2021-04-18 09:50:01 +02:00
2022-10-17 12:12:17 +02:00
- uses: actions/setup-node@v3
2021-04-18 09:50:01 +02:00
with:
node-version: 16
2021-04-18 09:50:01 +02:00
2021-05-24 15:20:31 +02:00
- run: npm ci
2021-05-08 21:39:59 +02:00
- run: npm run lint
- run: |
cat <<EOF > ./backend/.env
OPENVIDU_URL=${{ secrets.OPENVIDU_URL }}
OPENVIDU_SECRET=${{ secrets.OPENVIDU_SECRET }}
EOF
- run: cat backend/.env
2021-04-18 09:50:01 +02:00
- run: cd backend && npm ci && npm run build
env:
RICOCHET_SITE_KEY: ${{ secrets.RICOCHET_SECRET_KEY }}
2021-04-18 09:50:01 +02:00
- run: npm run build
env:
VITE_API_ENDPOINT: /api
2021-09-11 16:57:34 +02:00
VITE_SOCKET_URL: https://public.jeremiez.net/
VITE_SOCKET_PATH: /wamp/socket.io
2021-04-18 09:50:01 +02:00
VITE_RICOCHET_SITEID: airboardgame
VITE_USE_PROXY: 0
2022-01-20 21:39:10 +01:00
VITE_WEBCONFERENCE: audio
2022-03-14 23:01:28 +01:00
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
VITE_ENVIRONMENT: production
2021-04-18 09:50:01 +02:00
CYPRESS_INSTALL_BINARY: 0
- run: |
cat <<EOF > ./dist/_redirects
2022-10-24 23:16:48 +02:00
/api/* https://ricochetjs-deploy-production.up.railway.app/:splat 200
2021-04-18 09:50:01 +02:00
/* /index.html 200
EOF
- name: Deploy to Netlify
2022-10-17 12:12:17 +02:00
uses: nwtgck/actions-netlify@v1.2
2021-04-18 09:50:01 +02:00
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