Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix deploy

Veauville Raphael55a12096454a
diff --git a/.github/workflows/deploy_to_prod.yml b/.github/workflows/deploy_to_prod.yml
index 3a2150f8..cb397381 100755
--- a/.github/workflows/deploy_to_prod.yml
+++ b/.github/workflows/deploy_to_prod.yml
@@ -12,41 +12,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- - name: Add VPS host key to known_hosts
- run: |
- mkdir ~/.ssh
- touch ~/.ssh/known_hosts
- ssh-keyscan -H ${{ secrets.ssh_host }} >> ~/.ssh/known_hosts
- - name: Create deploy key file
+
+ - name: Deploy to VPS
run: |
echo "$DEPLOY_KEY" > deploy_key
- - name: Set permissions on deploy key
- run: chmod 400 deploy_key
- - name: Check for deploy key file
- run: |
- ssh-keygen -p -f deploy_key -m pem
- if [[ ! -f deploy_key.pem ]]; then
- echo "Deploy key file does not exist."
- exit 1
- fi
- - name: Check deploy key file
- run: |
- if ! [[ -f deploy_key.pem ]]; then
- echo "Deploy key file does not exist."
- exit 1
- fi
- if [[ ! -r deploy_key.pem ]]; then
- echo "Deploy key file is not readable."
- exit 1
- fi
- file deploy_key.pem | grep "PEM RSA private key"
- if [[ $? -ne 0 ]]; then
- echo "Deploy key file is not in the correct format."
- exit 1
- fi
- - name: Add deploy key to authorized_keys
- run: echo deploy_key.pem >> ~/.ssh/authorized_keys
- - name: Deploy to VPS
- run: scp -i deploy_key.pem -r frontend/* ${{ secrets.ssh_host }}:/home/smaug/sites/alexandrie/frontend
+ scp -i deploy_key -r frontend/dist/* user@your_server_ip:/var/www/mywebsite/frontend
+ scp -i deploy_key -r dashboard/dist/* user@your_server_ip:/var/www/mywebsite/frontend
+ scp -i deploy_key -r backend/dist/* user@your_server_ip:/var/www/mywebsite/frontend
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_SSH_KEY }}