From 2eb2f56c21684e72be6a15fe818f78e67e316267 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 14:56:39 +0200 Subject: [PATCH 1/7] Add username to git remote and always use latest ubuntu --- .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 0c22d52..adb044d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,12 +7,12 @@ on: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Deploy to Heroku env: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} run: | - git remote add heroku "https://:${HEROKU_API_KEY}@git.heroku.com/sthlmrb.git" + git remote add heroku "https://heroku:${HEROKU_API_KEY}@git.heroku.com/sthlmrb.git" git push heroku master From 8b2c3b49c6c37bc7df0d4dc270770ba437507454 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 15:06:21 +0200 Subject: [PATCH 2/7] Attempt to fix deploy thing --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index adb044d..6795bd9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,6 +13,7 @@ jobs: - name: Deploy to Heroku env: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + HEROKU_APP_NAME: ${{ vars.HEROKU_APP_NAME || 'sthlmrb' }} run: | - git remote add heroku "https://heroku:${HEROKU_API_KEY}@git.heroku.com/sthlmrb.git" + git remote add heroku "https://heroku:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" git push heroku master From 45ebc979ea0cb43da08e8f56b2e98ce6576c4831 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 15:08:00 +0200 Subject: [PATCH 3/7] No username according to docs --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6795bd9..ffc2327 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,5 +15,5 @@ jobs: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} HEROKU_APP_NAME: ${{ vars.HEROKU_APP_NAME || 'sthlmrb' }} run: | - git remote add heroku "https://heroku:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" + git remote add heroku "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" git push heroku master From 1717b37aaa718d6697a2cbb69d3d4b95e3d03471 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 15:08:34 +0200 Subject: [PATCH 4/7] Try straight without remote --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ffc2327..9e179ed 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,5 +15,4 @@ jobs: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} HEROKU_APP_NAME: ${{ vars.HEROKU_APP_NAME || 'sthlmrb' }} run: | - git remote add heroku "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" - git push heroku master + git push "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" master From 7119add7994ea06ed50f1547cf006a3b198e3a93 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 15:10:17 +0200 Subject: [PATCH 5/7] Allow manual deploy --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9e179ed..3828511 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,12 +1,13 @@ name: Deploy on: + workflow_dispatch: push: branches: - master jobs: - build: + deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 9340ee9e63740b73ef41824e328ef842eb8536a2 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 15:12:19 +0200 Subject: [PATCH 6/7] no shallow clone --- .github/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3828511..2a7b41d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,9 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Deploy to Heroku env: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} HEROKU_APP_NAME: ${{ vars.HEROKU_APP_NAME || 'sthlmrb' }} run: | - git push "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" master + git remote add origin "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" + git push heroku master From b5edb92bc16b2b3f66b218295fae25fb97541802 Mon Sep 17 00:00:00 2001 From: Kim Burgestrand Date: Tue, 15 Oct 2024 15:12:53 +0200 Subject: [PATCH 7/7] Remote is heroku --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2a7b41d..9be639f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,5 +18,5 @@ jobs: HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} HEROKU_APP_NAME: ${{ vars.HEROKU_APP_NAME || 'sthlmrb' }} run: | - git remote add origin "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" + git remote add heroku "https://:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git" git push heroku master