Skip to content

try self-hosted runner #25

try self-hosted runner

try self-hosted runner #25

Workflow file for this run

name: Deploy
on: [push]
jobs:
build:
runs-on: self-hosted
environment: vps
steps:
- uses: actions/checkout@v4
- name: node install and build
uses: actions/setup-node@v4.0.4
with:
node-version: '20.x'
- run: yarn install
- run: yarn build
- name: Copy repository contents via scp
uses: c0c1/scp-action@v1.0
with:
host: ${{ secrets.HOST }}
user: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSH_KEY }}
source: './public'
remote: '/var/www/joel.fm/build'
- name: SSH action
uses: tiyee/action-ssh@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
privateKey: ${{ secrets.SSH_KEY }}
command: |
cd /var/www/joel.fm &&
rm -rf /var/www/joel.fm/html-test &&
./scripts/symlinks.sh