From 6259f7f8ccbaa17740ce44c4defc7b7d9a7ce918 Mon Sep 17 00:00:00 2001 From: Herman Karlsson Date: Thu, 7 Sep 2023 21:37:12 +0200 Subject: [PATCH 1/2] add autodeploy --- .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2585589 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +name: Deploy + +on: + push: + branches: [ master ] + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Git checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + # See the following link for documentation: + # https://github.com/marketplace/actions/dokku + - name: Push to mjukglass + uses: dokku/github-action@v1.4.0 + with: + ssh_private_key: ${{ secrets.MJUKGLASS_GLOBAL_DEPLOY_KEY }} + git_remote_url: ssh://dokku@sips.datasektionen.se/calypso + # force might feel risky, but there is no good reason why the server + # should ever not be a mirror of the deploy branch. And the errors we + # could get otherwise would probably be nasty to deal with + git_push_flags: --force \ No newline at end of file From cc00c39824eee3c76827d51c983bdbc84b65c939 Mon Sep 17 00:00:00 2001 From: Herman Karlsson Date: Thu, 7 Sep 2023 22:48:59 +0200 Subject: [PATCH 2/2] change script to push to mjukglass instead of sips --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2585589..e2cbf7b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,8 +21,8 @@ jobs: uses: dokku/github-action@v1.4.0 with: ssh_private_key: ${{ secrets.MJUKGLASS_GLOBAL_DEPLOY_KEY }} - git_remote_url: ssh://dokku@sips.datasektionen.se/calypso + git_remote_url: ssh://dokku@mjukglass.datasektionen.se/calypso # force might feel risky, but there is no good reason why the server # should ever not be a mirror of the deploy branch. And the errors we # could get otherwise would probably be nasty to deal with - git_push_flags: --force \ No newline at end of file + git_push_flags: --force