name: Node.js CD deploy on: push: branches: [ deploy-cd ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: build uses: actions/setup-node@v4 with: node-version: 18.17 - run: npm install - run: CI=false npm run build - name: deploy uses: appleboy/scp-action@v0.1.7 with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} key: ${{ secrets.PRIVATE_KEY }} source: build/* target: /var/www/html strip_components: true rm: true