Skip to content

added netdbuser properties to user object #30

added netdbuser properties to user object

added netdbuser properties to user object #30

Workflow file for this run

name: Build & Deploy
on:
workflow_dispatch:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: make
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: ./roundcubemail-1.7-git.tar.gz
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: build-complete
path: ./roundcubemail-1.7-git-complete.tar.gz
deploy:
runs-on: ubuntu-latest
needs: build
env:
SSH_USER: github
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_HOST: 194.36.146.51
REPO_NAME: ${{ github.event.repository.name }}
CONFIG: ${{ secrets.CONFIG }}
steps:
- name: Download production artifacts
uses: actions/download-artifact@v4
with:
name: build-complete
- name: Install ssh key
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/staging.key
chmod 600 ~/.ssh/staging.key
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
- name: Configure SSH
run: |
cat >>~/.ssh/config <<END
Host staging
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/staging.key
StrictHostKeyChecking no
END
- name: Check SSH Connection
run: ssh staging 'echo "It works!"'
- name: Delete previous deploy files
run: ssh staging "sudo rm -r /home/$SSH_USER/$REPO_NAME/*"
continue-on-error: true
- name: Deploy build
run: rsync -avz -e 'ssh -i ~/.ssh/staging.key -o StrictHostKeyChecking=no' --progress ./roundcubemail-1.7-git-complete.tar.gz $SSH_USER@$SSH_HOST:/home/$SSH_USER/$REPO_NAME
- name: Unzip
run: ssh staging "cd /home/$SSH_USER/$REPO_NAME/ && sudo tar --no-same-owner --no-same-permissions -xf roundcubemail-1.7-git-complete.tar.gz"
- name: Delete current deployed files
run: ssh staging 'sudo rm -r -d /var/www/mail2/'
continue-on-error: true
- name: Copy files
run: ssh staging "sudo rsync -a --ignore-existing /home/$SSH_USER/$REPO_NAME/roundcubemail-1.7-git/ /var/www/mail2/"
- name: Set permissions
run: ssh staging "sudo chown -R www-data:www-data /var/www/mail2/"