-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.13 KB
/
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
name: 🚀 Deploy Web
on:
push:
branches: [main]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: 💻 Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: 🔐 Create Production Environment File
run: |
touch .env
echo NEXT_PUBLIC_HCAPTCHA = ${{ secrets.NEXT_PUBLIC_HCAPTCHA }} >> .env
echo NEXT_PUBLIC_EMAILJS_SERVICE_ID = ${{ secrets.NEXT_PUBLIC_EMAILJS_SERVICE_ID }} >> .env
echo NEXT_PUBLIC_EMAILJS_TEMPLATE_ID = ${{ secrets.NEXT_PUBLIC_EMAILJS_TEMPLATE_ID }} >> .env
echo NEXT_PUBLIC_EMAILJS_PUBLIC_KEY = ${{ secrets.NEXT_PUBLIC_EMAILJS_PUBLIC_KEY }} >> .env
echo NEXT_PUBLIC_POSTHOG_KEY = ${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }} >> .env
echo NEXT_PUBLIC_POSTHOG_HOST = ${{ secrets.NEXT_PUBLIC_POSTHOG_HOST }} >> .env
echo NODE_ENV = ${{ secrets.NODE_ENV }} >> .env
- run: npm install
- run: npm run build