⚠️‼️ deploy_prod → rundgang.udk-berlin.de #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: '⚠️‼️ deploy_prod → rundgang.udk-berlin.de' | |
on: | |
#push: | |
# branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: The branch, tag or SHA to checkout | |
required: true | |
default: 'main' | |
jobs: | |
deploy_prod: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.inputs.ref}} | |
- name: Sync files to remote host | |
uses: up9cloud/[email protected] | |
env: | |
HOST: rundgang.udk-berlin.de | |
KEY: ${{secrets.SSH_RUNDGANG_UDK_BERLIN_DE}} | |
TARGET: /opt/rundgang-website-2024/ | |
VERBOSE: true | |
USER: root | |
PORT: 22 | |
ARGS: --recursive --update --delete --compress --exclude=/.env --exclude=/.git/ --exclude=/public/fonts/ | |
SSH_ARGS: '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' | |
SOURCE: . | |
- name: Restart rundgang-website-2024 service | |
uses: fifsky/[email protected] | |
with: | |
command: | | |
cd /opt/rundgang-website-2024/ | |
npm clean-install | |
npm run build | |
systemctl restart rundgang-website-2024.service | |
host: rundgang.udk-berlin.de | |
user: root | |
key: ${{secrets.SSH_RUNDGANG_UDK_BERLIN_DE}} |