Skip to content

Commit

Permalink
ci: build and copy files to econosim.org
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBuhler committed Dec 3, 2024
1 parent ddec6ff commit 62c8aa6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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_RSA_PRIVATE_KEY }}
KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
run: |
mkdir -p ~/.ssh
echo "$RSA_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
- 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
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.autoSave": "onFocusChange",
"editor.formatOnPaste": true,
"editor.formatOnSave": true
}

0 comments on commit 62c8aa6

Please sign in to comment.