Skip to content

chore(ci): dry deploy workflow #7

chore(ci): dry deploy workflow

chore(ci): dry deploy workflow #7

Workflow file for this run

name: Deploy to Uberspace development
on:
push:
branches:
- staging
- development
- ci
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set environment variables for development
if: ${{ github.ref_name == 'ci' }}
run: |
echo "REMOTE_HOST=${{ secrets.REMOTE_HOST_DEV }}" >> $GITHUB_ENV
echo "REMOTE_USER=${{ secrets.REMOTE_USER_DEV }}" >> $GITHUB_ENV
- name: Set environment variables for staging
if: ${{ github.ref_name == 'staging' }}
run: |
echo "REMOTE_HOST=${{ secrets.REMOTE_HOST_STAGING }}" >> $GITHUB_ENV
echo "REMOTE_USER=${{ secrets.REMOTE_USER_STAGING }}" >> $GITHUB_ENV
- name: Deploy to Server
uses: easingthemes/[email protected]
with:
ARGS: '-rlgoDzvc -i --delete'
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ env.REMOTE_HOST }}
REMOTE_USER: ${{ env.REMOTE_USER }}
SOURCE: '.'
TARGET: '/home/${{ env.REMOTE_USER }}/serlo-editor-as-lti-tool/'
EXCLUDE: '/node_modules/'
SCRIPT_AFTER: |
cd /home/${{ env.REMOTE_USER }}/serlo-editor-as-lti-tool/
yarn
yarn build
supervisorctl restart serlo-app