Skip to content

Commit

Permalink
Create autoredeploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasKnudsen authored and GitHub committed Feb 21, 2024
1 parent 50e930f commit 1f7fbfa
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/autoredeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Node.js CI
on:
push:
branches: ["main"]

jobs:
frontend-build:
strategy:
matrix:
node-version: [20.x]
defaults:
run:
working-directory: ./frontend
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: pm2 restart nextfrontend


backend-build:
strategy:
matrix:
node-version: [20.x]
defaults:
run:
working-directory: ./backend
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm run build
- run: pm2 restart strapibackend

0 comments on commit 1f7fbfa

Please sign in to comment.