Skip to content

Commit

Permalink
deploy to server
Browse files Browse the repository at this point in the history
first deploy to start
  • Loading branch information
mojtaba1180 authored May 3, 2023
2 parents 51d337a + 1ffe7d8 commit 8e698de
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
kind: pipeline
name: telegram-front

trigger:
branch:
- deploy
steps:
- name: install
image: node:14
Expand All @@ -11,3 +14,25 @@ steps:
image: node:14
commands:
- npm run build

- name: deploy
image: ubuntu:20.04
environment:
SSH_KEY:
from_secret: SSH_KEY
SSH_USER:
from_secret: SSH_USER
SSH_HOST:
from_secret: SSH_HOST
SSH_PATH:
from_secret: SSH_PATH
SSH_PASS:
from_secret: SSH_PASS
commands:
- apt-get update && apt-get install -y openssh-client sshpass
- mkdir -p ~/.ssh
- echo "$SSH_KEY" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts
- ls
- sshpass -p $SSH_PASS scp -r dist/* $SSH_USER@$SSH_HOST:$SSH_PATH
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function App() {
const [colorScheme, themeParams] = useThemeParams();
// eslint-disable-next-line operator-linebreak
const mode = import.meta.env.VITE_DEV_MODE !== "true";
console.log(sessionStorage.getItem("__telegram__initParams"));
console.log(JSON.parse(sessionStorage.getItem("__telegram__initParams")));
return (
<div className=" app w-full py-1 ">
<div className=" w-full !max-w-[450px]">
Expand Down

0 comments on commit 8e698de

Please sign in to comment.