This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ШАГ 1: Настроить SSH-доступ к VPS | |
| GitHub Actions будет деплоить проект через SSH, поэтому нам нужно создать ключ и добавить его на сервер. | |
| ## 1.1. Создать SSH-ключ | |
| На локальном ПК выполни: | |
| \``` | |
| ssh-keygen -t rsa -b 4096 -C "github-deploy-key" | |
| \``` | |
| Нажми Enter несколько раз, не вводя пароль. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Установить npm и nginx | |
| ``` | |
| sudo apt install nodejs npm | |
| sudo apt install nginx | |
| ``` | |
| 2. Скачать всё с данной ветки (readme можно удалить) | |
| 3. Засунуть на сервак | |
| 4. Перейти, куда запихнули | |
| ``` | |
| cd путь_до_папки_с_фронтом |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /app | |
| git status | |
| git checkout frontend2 | |
| git fetch origin frontend2 | |
| git reset --hard origin/frontend2 | |
| systemctl reload apache2 | |