Skip to content

Commit

Permalink
(cicd) Add deploy config
Browse files Browse the repository at this point in the history
  • Loading branch information
lilchizh committed Oct 16, 2023
1 parent aad196b commit ea88aad
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Algebra Integral Deploy

on:
push:
branches:
- master

jobs:
deploy:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: npm ci

- name: Build
run: CI=false npm run build

#setup key
- run: set -eu
- run: mkdir "$HOME/.ssh"
- run: echo "${{ secrets.SHHKEYM }}" > "$HOME/.ssh/SHHKEYM"
- run: chmod 600 "$HOME/.ssh/SHHKEYM"
#deploy
- run: cd public && rsync -e "ssh -i $HOME/.ssh/SHHKEYM -o StrictHostKeyChecking=no" -a --compress --delete . [email protected]:/var/www/integral-algebra-finance/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"wagmi-generate": "wagmi generate",
"build": "yarn codegen && yarn wagmi-generate && tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"codegen": "graphql-codegen --config codegen.ts "
Expand Down

0 comments on commit ea88aad

Please sign in to comment.