Skip to content

publish-event

publish-event #615

name: Contentful Publish
on:
repository_dispatch:
types: ["publish-event"]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Set up the ssh connection on the box to provide a cleaner interface for running ssh commands remotely
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/prod.key
chmod 600 ~/.ssh/prod.key
cat >>~/.ssh/config <<END
Host prod
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/prod.key
StrictHostKeyChecking no
END
env:
SSH_HOST: ${{ secrets.DOKKU_SERVER }}
SSH_KEY: ${{ secrets.DOKKU_WEBSITE_KEY }}
SSH_USER: ${{ secrets.DOKKU_USER }}
- name: Dokku Rebuild
run: ssh prod ps:rebuild website