Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

github actions ssh

name: Node.js CI

on:
  push:
    branches: [ master ]
    
jobs:
  build-and-test:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x]

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - run: npm i
    - run: npm run build
    - run: npm run test
  
  deploy:
    needs: build-and-test
    runs-on: ubuntu-latest
    
    strategy:
      matrix:
        node-version: [16.x]
        
    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: appleboy/ssh-action@master
        with:
          host: ${{ secrets.IP }}
          username: ${{ secrets.USERNAME }}
          key: ${{ secrets.KEY }}
          script: cd path/to/your/app/directory && git checkout . && git pull && npm run build && pm2 restart MyApp
Comment

PREVIOUS NEXT
Code Example
Javascript :: javasript array indexof 
Javascript :: angular new component 
Javascript :: A simple static file server built with Node.js 
Javascript :: moment is date equals 
Javascript :: javascript string ends with 
Javascript :: how get height elemnt with that margin in js 
Javascript :: window.location.href url.action parameters 
Javascript :: sentry erros 
Javascript :: radio javascript checked 
Javascript :: full text search all string fields in the index mongodb 
Javascript :: foreach modify array javascript 
Javascript :: two decimal places javascript 
Javascript :: how to add d3.js in angular 
Javascript :: ejs include with variable 
Javascript :: sum of array of number 
Javascript :: round innerhtml value up javascript 
Javascript :: sweetalert allow html 
Javascript :: js loop away backward 
Javascript :: jquery input hidden value 
Javascript :: generate random 6 digit number javascript 
Javascript :: js array.prototype.join 
Javascript :: java script how to not allow soace 
Javascript :: javascript compose function 
Javascript :: Javascript load at Window loading time 
Javascript :: js rock paper scissors 
Javascript :: js input trigger oninput event 
Javascript :: Check for a Null or Empty String in JavaScript 
Javascript :: react native toast message 
Javascript :: what is template engine in express 
Javascript :: Calculator Function JS Javascript 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =