Skip to content

feat: update

feat: update #68

name: Deploy - Production
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
environment:
name: production
url: https://fortress-v2.netlify.app
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: pnpm/action-setup@v2
with:
version: 8
# Cache node modules and next folder
- name: Caching
uses: actions/cache@v2
with:
path: |
**/node_modules
${{ github.workspace }}/apps/admin/.next/cache
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install dependencies
run: pnpm i --shamefully-hoist
# Build & deploy the app
- name: Build & Deploy
id: build-and-deploy
run: |
COMMAND="netlify deploy --build --prod"
OUTPUT=$(sh -c "$COMMAND")
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}