Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #3 updating deploy.yml automation #4

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
Deploy:
environment: production
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server."
Expand All @@ -26,7 +26,14 @@ jobs:
ssh-keyscan ${{ secrets.DOKKU_HOST }}>> ~/.ssh/known_hosts
eval `ssh-agent -s`
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY}}"
ssh dokku@${{ secrets.DOKKU_HOST }} -C "dokku apps:create givemeadatabase" | true
ssh dokku@${{ secrets.DOKKU_HOST }} -C "dokku git:initialize givemeadatabase"
ssh dokku@${{ secrets.DOKKU_HOST }} -C dokku builder:set givemeadatabase build-dir src
ssh dokku@${{ secrets.DOKKU_HOST }} -C "dokku builder-dockerfile:set givemeadatabase dockerfile-path Dockerfile"
ssh dokku@${{ secrets.DOKKU_HOST }} -C "dokku git:sync --build givemeadatabase" https://github.com/KarmaComputing/givemeadatabase.git main
ssh dokku@${{ secrets.DOKKU_HOST }} -C dokku domains:set db.anotherwebservice.com
ssh dokku@${{ secrets.DOKKU_HOST }} -C "dokku config:set --no-restart givemeadatabase DOKKU_LETSENCRYPT_EMAIL=${{ secrets.LETSENCRYPT_EMAIL }}"
ssh dokku@${{ secrets.DOKKU_HOST }} -C dokku letsencrypt:enable givemeadatabase
ssh dokku@${{ secrets.DOKKU_HOST }} -C "dokku letsencrypt:cron-job --add"