Skip to content

adding scp step

adding scp step #4

Workflow file for this run

name: Publish
on:
push:
branches:
- "*"
- "!master"
- "!main"
jobs:
build:
name: Build
runs-on: ubuntu-22.04
env:
DEPLOY_DESTINATION: ${{ secrets.DEPLOY_DESTINATION }}
DEPLOY_PORT: ${{ secrets.DEPLOY_PORT }}
SSHKEY: ${{ secrets.SSHKEY }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
strategy:
matrix:
node-version: [23.x]
permissions:
contents: read
security-events: write
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependendencies
run: npm install
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Deploy
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ env.SSHKEY }}"
scp -P ${{ env.DEPLOY_PORT }} -o StrictHostKeyChecking=no dist/* ${{ env.DEPLOY_DESTINATION }}