chore: Update deploy-beta.yml to include beta branch in SSH setup and deployment

This commit is contained in:
Frederico Santos 2024-07-06 01:28:57 +01:00 committed by ImperialSympathizer
parent 1d0109a386
commit 1e1c67cd40
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ jobs:
env: env:
NODE_ENV: production NODE_ENV: production
- name: Set up SSH - name: Set up SSH
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch if: github.event_name == 'push' && (github.ref_name == github.event.repository.default_branch || github.ref_name == 'refs/heads/beta')
run: | run: |
mkdir ~/.ssh mkdir ~/.ssh
echo "${{ secrets.BETA_SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub echo "${{ secrets.BETA_SSH_PUBLIC_KEY }}" > ~/.ssh/id_ed25519.pub
@ -28,6 +28,6 @@ jobs:
chmod 600 ~/.ssh/* chmod 600 ~/.ssh/*
ssh-keyscan -H ${{ secrets.BETA_SSH_HOST }} >> ~/.ssh/known_hosts ssh-keyscan -H ${{ secrets.BETA_SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy build on server - name: Deploy build on server
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch if: github.event_name == 'push' && (github.ref_name == github.event.repository.default_branch || github.ref_name == 'refs/heads/beta')
run: | run: |
rsync --del --no-times --checksum -vrm dist/* ${{ secrets.BETA_SSH_USER }}@${{ secrets.BETA_SSH_HOST }}:${{ secrets.BETA_DESTINATION_DIR }} rsync --del --no-times --checksum -vrm dist/* ${{ secrets.BETA_SSH_USER }}@${{ secrets.BETA_SSH_HOST }}:${{ secrets.BETA_DESTINATION_DIR }}