Skip to content

Commit

Permalink
Merge pull request #63 from serlo/build/deploy-to-uberspace-dev-action
Browse files Browse the repository at this point in the history
build(github): actions for deploying development and staging to Uberspace
  • Loading branch information
LarsTheGlidingSquirrel authored Sep 25, 2024
2 parents b217aef + 8515abc commit 62a538b
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy-to-uberspace-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to Uberspace development

on:
push:
branches: [development]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to Server
uses: easingthemes/[email protected]
with:
ARGS: '-rlgoDzvc -i --delete'
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST_DEV }}
REMOTE_USER: ${{ secrets.REMOTE_USER_DEV }}
SOURCE: '.'
TARGET:
'/home/${{ secrets.REMOTE_USER_DEV }}/serlo-editor-as-lti-tool/'
EXCLUDE: '/node_modules/'
SCRIPT_AFTER: |
cd /home/${{ secrets.REMOTE_USER_DEV }}/serlo-editor-as-lti-tool/
yarn
yarn build
supervisorctl restart serlo-app
29 changes: 29 additions & 0 deletions .github/workflows/deploy-to-uberspace-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to Uberspace staging

on:
push:
branches: [staging]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to Server
uses: easingthemes/[email protected]
with:
ARGS: '-rlgoDzvc -i --delete'
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST_STAGING }}
REMOTE_USER: ${{ secrets.REMOTE_USER_STAGING }}
SOURCE: '.'
TARGET:
'/home/${{ secrets.REMOTE_USER_STAGING }}/serlo-editor-as-lti-tool/'
EXCLUDE: '/node_modules/'
SCRIPT_AFTER: |
cd /home/${{ secrets.REMOTE_USER_STAGING }}/serlo-editor-as-lti-tool/
yarn
yarn build
supervisorctl restart serlo-app

0 comments on commit 62a538b

Please sign in to comment.