-
Notifications
You must be signed in to change notification settings - Fork 67
66 lines (59 loc) · 1.89 KB
/
prod.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
59
60
61
62
63
64
65
66
name: Production CI
on:
push:
branches:
- prod
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Install
run: yarn install
- name: Build
env:
NODE_OPTIONS: --max_old_space_size=4096
VITE_SENTRY_DSN: "https://[email protected]/50"
VITE_SENTRY_ENVIRONMENT: "production"
VITE_SENTRY_RELEASE: ${{ github.sha }}
run: yarn build
- name: Create Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: Netlify
ref: ${{ github.event.workflow_run.head_sha }}
- name: Rename .well-known -> well-known for Netlify upload
run: mv dist/.well-known dist/well-known
- name: Deploy to Netlify
id: netlify
uses: nwtgck/[email protected]
with:
publish-dir: dist
deploy-message: "Production Deploy from GitHub Actions"
netlify-config-path: ./netlify.toml
github-token: ${{ secrets.GITHUB_TOKEN }}
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
- name: Update deployment status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
override: false
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: ${{ steps.netlify.outputs.deploy-url }}