Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurpigeon committed Jan 3, 2025
0 parents commit 7b3161e
Show file tree
Hide file tree
Showing 21 changed files with 4,391 additions and 0 deletions.
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: Deploy

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Deploy API
run: |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} '
cd /var/www/api &&
git pull &&
npm install &&
npm run build &&
pm2 restart api'
- name: Build and deploy frontend
env:
VITE_REACT_APP_API_URL: https://max.oseille.app
run: |
npm ci
npm run build
scp -r build/* ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:/var/www/html/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"shimataro"
]
}
Loading

0 comments on commit 7b3161e

Please sign in to comment.