From 1f7fbfa824cd285b450a8a5145a8cabd2b77a818 Mon Sep 17 00:00:00 2001 From: EliasKnudsen <38568225+EliasKnudsen@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:16:46 +0100 Subject: [PATCH] Create autoredeploy.yml --- .github/workflows/autoredeploy.yml | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/autoredeploy.yml diff --git a/.github/workflows/autoredeploy.yml b/.github/workflows/autoredeploy.yml new file mode 100644 index 0000000..38f2459 --- /dev/null +++ b/.github/workflows/autoredeploy.yml @@ -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