Skip to content

Update the deployment section in the README file #5

Update the deployment section in the README file

Update the deployment section in the README file #5

Workflow file for this run

name: Build the main branch and deploy it to habra-adm.ru
on:
push:
branches:
- main
permissions:
contents: read
deployments: write
concurrency:
group: deployment
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: habra-adm.ru
url: https://habra-adm.ru
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm ci
- run: npm run build
env:
NODE_ENV: production
- name: Deploy to habra-adm.ru
run: |
mkdir ~/.ssh
echo "${{ vars.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
eval `ssh-agent`
echo "$SSH_PRIVATE_KEY" | ssh-add -
rsync --recursive --verbose dist/ [email protected]:/var/www/habra-adm.ru
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Check if the URL is accessible
run: curl --fail https://habra-adm.ru