Skip to content

deploy

deploy #7

Workflow file for this run

name: Deploy to Linode
on:
push:
branches:
- prod
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up SSH Agent
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.LINODE_SSH_KEY }}
- name: build
run: |
npm run build
- name: Deploy to Ubuntu server via SSH
uses: appleboy/scp-action@v0.1.2
with:
host: ${{ secrets.LINODE_IP }}
username: ${{ secrets.LINODE_USER }}
key: ${{ secrets.LINODE_SSH_KEY }}
port: 22 # Default is 22
source: 'dist/*'
target: '/opt/nodejs/'