forked from drimov/CookRecipes
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.34 KB
/
node.js.yml
File metadata and controls
43 lines (38 loc) · 1.34 KB
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Generate a build and push to another branch
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
environment: production
env:
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_STORAGE_BUCKET: ${{ secrets.VITE_STORAGE_BUCKET }}
VITE_API_URL: ${{ secrets.VITE_API_URL }}
VITE_API_IMAGE: ${{ secrets.VITE_API_IMAGE }}
CYPRESS_EMAIL: ${{ secrets.CYPRESS_EMAIL }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
name: Build and Push
steps:
- name: git-checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: pnpm/action-setup@v2
with:
version: "8"
- name: pnpm install and build
run: |
pnpm install
pnpm build
- name: Deploy
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: build
FOLDER: dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build ({sha} {msg})"