Skip to content

feature: improved ccalendar data styling #47

feature: improved ccalendar data styling

feature: improved ccalendar data styling #47

name: Deploy Rozhdestvennik
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup SSH Agent
run: |
eval "$(ssh-agent -s)"
mkdir -p ~/.ssh
echo "${{ secrets.VPS_DEPLOY_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.VPS_DEPLOY_PRIVATE }}" > ~/.ssh/id_rsa2
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa2
ssh-add ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa2
ssh-keyscan -H ${{ secrets.VPS_SSH_ADDRESS }} >> ~/.ssh/known_hosts
ssh-keyscan github.com >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Add GitHub repository remote
run: git remote set-url origin git@github.com:b-angelov/react_js_2025_exam.git
- name: Deploy to VPS
run: |
ssh -A -o "ServerAliveInterval=60" -o "ServerAliveCountMax=3" ${{secrets.VPS_SSH_USER}}@${{secrets.VPS_SSH_ADDRESS}} << 'EOF'
cd ${{secrets.VPS_PROJECT_PATH}}
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm use 20 || nvm install 20
git config core.sshCommand "ssh -i ${{secrets.DEPLOY_KEY_PATH}} -o IdentitiesOnly=yes"
git pull origin master
npm install
npm run build
exit
EOF
- name: Deployment Success
if: success()
run: echo "✅ Deployment completed successfully!"
- name: Deployment Failed
if: failure()
run: echo "❌ Deployment failed!"