move useless workflow to a new job

This commit is contained in:
nessar committed 2024-04-14 20:01:36 +02:00
1 parent 0ae0463d08
commit 1042985009
2 files changed
+26 -38

No files matched your search

+26 -8
View File
@@ -1,17 +1,34 @@
name: Deploy
# 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: deploy
# run after validate workflow has completed and the current branch is 'beta'
on:
workflow_run:
workflows: ['validate']
types: [completed]
branches:
- 'main'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
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 --if-present
deploy:
name: deploy
needs: validate
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
@@ -22,3 +39,4 @@ jobs:
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: cd /home/nessar/portfolio/ ; ./installRelease.sh