publish-event #626
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: 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 |