Skip to content

wip: workflow testing #2

wip: workflow testing

wip: workflow testing #2

Workflow file for this run

name: Build and Copy to Server
on:
push:
branches:
- master
jobs:
build-and-scp:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- env:
RSA_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$RSA_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- run: npm install
- run: npm run build
- run: |
ssh [email protected] rm -frv /www/econosim.org/econosim.org/static
scp \
-r \
build/* \
[email protected]:/www/econosim.org/econosim.org