Skip to content

Commit

Permalink
[ci] run both workflows sequentially
Browse files Browse the repository at this point in the history
  • Loading branch information
tiefpunkt committed Oct 18, 2024
1 parent ec767a5 commit d8cfb4e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 42 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy

on:
workflow_run:
workflows: ["Create and publish a Docker image"]
branches: [main]
types:
- completed

jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Setup SSH key
shell: bash
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "${SSH_PRIVATE_KEY}" | base64 -d > ${HOME}/.ssh/deploy.id_rsa
chmod 700 ${HOME}/.ssh/deploy.id_rsa
- name: Update Docker container
shell: bash
run: |
ssh -i ${HOME}/.ssh/deploy.id_rsa -o StrictHostKeyChecking=no root@saturn.munichmakerlab.de << EOF
docker pull ghcr.io/munichmakerlab/website:main
systemctl restart docker-website.service
systemctl status docker-website.service
EOF
42 changes: 0 additions & 42 deletions .github/workflows/jekyll-deploy.yml

This file was deleted.

0 comments on commit d8cfb4e

Please sign in to comment.