From c83e5c1ad0bda6c4b1fdf32ff56a793f634fea42 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 19 Aug 2023 18:33:53 +0200 Subject: [PATCH 01/15] Switch to ubuntu (new branch) --- .github/workflows/deploy.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f2617fd48..b9739f697 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,7 +17,7 @@ jobs: pr_preview: name: Build & Deploy to PR preview - runs-on: windows-latest + runs-on: ubuntu-latest if: github.event_name == 'pull_request_target' && github.event.action != 'closed' @@ -69,6 +69,7 @@ jobs: echo "url=$url" >> $env:GITHUB_OUTPUT env: SWA_CLI_DEPLOYMENT_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_PEBBLE_0224C3803 }} + shell: pwsh - name: Install Python uses: actions/setup-python@v4 @@ -85,20 +86,20 @@ jobs: az extension add --name rdbms-connect --version 1.0.3 --debug az postgres flexible-server execute --name jabrefdb -u "Github" -p "$pwd" --database-name $name -q "GRANT CREATE ON DATABASE $name TO azure_pg_admin; create schema public;" --output table yarn prisma:migrate:reset --force - + shell: pwsh - name: Create & Link Function App run: | pip install azure-identity azure-mgmt-web azure-mgmt-storage azure-mgmt-applicationinsights azure-mgmt-redis azure-mgmt-communication - python .github\scripts\deploy.py --env ${{ github.event.pull_request.number }} + python .github/scripts/deploy.py --env ${{ github.event.pull_request.number }} env: SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} AZURE_SESSION_SECRET: ${{ secrets.AZURE_SESSION_SECRET }} - name: Deploy Function App run: | - Compress-Archive -Path .output\server\* -DestinationPath .output\server.zip - az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ github.event.pull_request.number }} --src .output\server.zip - + Compress-Archive -Path .output/server/* -DestinationPath .output/server.zip + az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ github.event.pull_request.number }} --src .output/server.zip + shell: pwsh - name: Check HTTP status run: | Start-Sleep -Seconds 30 @@ -126,7 +127,7 @@ jobs: build_and_deploy: name: Build & Deploy to ${{ matrix.environment }} - runs-on: windows-latest + runs-on: ubuntu-lateset if: github.event_name == 'push' @@ -188,7 +189,7 @@ jobs: # Delete old deployment (otherwise we get a spawn EBUSY error when running the workflow again) az staticwebapp environment delete --name jabref-online --environment-name ${{ matrix.deployment_environment }} --yes || true - yarn swa deploy .output\public --env ${{ matrix.deployment_environment }} + yarn swa deploy .output/public --env ${{ matrix.deployment_environment }} env: SWA_CLI_DEPLOYMENT_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_PEBBLE_0224C3803 }} @@ -200,16 +201,16 @@ jobs: - name: Create & Link Function App run: | pip install azure-identity azure-mgmt-web azure-mgmt-storage azure-mgmt-applicationinsights azure-mgmt-redis azure-mgmt-communication - python .github\scripts\deploy.py --env ${{ matrix.deployment_environment }} + python .github/scripts/deploy.py --env ${{ matrix.deployment_environment }} env: SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} AZURE_SESSION_SECRET: ${{ secrets.AZURE_SESSION_SECRET }} - name: Deploy Function App run: | - Compress-Archive -Path .output\server\* -DestinationPath .output\server.zip - az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ matrix.deployment_environment }} --src .output\server.zip - + Compress-Archive -Path .output/server/* -DestinationPath .output/server.zip + az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ matrix.deployment_environment }} --src .output/server.zip + shell: pwsh - name: Check HTTP status run: | Start-Sleep -Seconds 30 From a98eec6f123e5aeaf2c6744a67bec89bb131ec83 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 19 Aug 2023 19:27:27 +0200 Subject: [PATCH 02/15] Update deploy.yml fix --- .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 b9739f697..23590646b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -127,7 +127,7 @@ jobs: build_and_deploy: name: Build & Deploy to ${{ matrix.environment }} - runs-on: ubuntu-lateset + runs-on: ubuntu-latest if: github.event_name == 'push' From 90781f9f7ab1067e30e614bf9ef9bc1d9374d23b Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 19 Aug 2023 20:09:38 +0200 Subject: [PATCH 03/15] Add workflow dispatch --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 23590646b..9d840f157 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,7 @@ on: types: [opened, synchronize, reopened, closed, labeled] branches: - main + workflow_dispatch: permissions: pull-requests: write From 08bb89dcca0cb0018be233a3b5f7d92c818c6c6a Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 19 Aug 2023 20:45:06 +0200 Subject: [PATCH 04/15] fix pwsh add hint on manual commit --- .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 9d840f157..5a2074aa4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -102,6 +102,7 @@ jobs: az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ github.event.pull_request.number }} --src .output/server.zip shell: pwsh - name: Check HTTP status + shell: pwsh run: | Start-Sleep -Seconds 30 curl -s -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' ${{ steps.deploy_web.outputs.url }} || true @@ -130,7 +131,7 @@ jobs: runs-on: ubuntu-latest - if: github.event_name == 'push' + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' strategy: fail-fast: false From b58ef9b19c077aff675ee6924fac347967764d78 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sat, 19 Aug 2023 21:00:24 +0200 Subject: [PATCH 05/15] use bash for sleep --- .github/workflows/deploy.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5a2074aa4..33346c0a0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -102,9 +102,9 @@ jobs: az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ github.event.pull_request.number }} --src .output/server.zip shell: pwsh - name: Check HTTP status - shell: pwsh + shell: bash run: | - Start-Sleep -Seconds 30 + sleep 30 curl -s -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' ${{ steps.deploy_web.outputs.url }} || true curl -s -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' ${{ steps.deploy_web.outputs.url }}/api || true # The api returns 400 status code for some reason @@ -214,8 +214,9 @@ jobs: az functionapp deployment source config-zip -g JabRefOnline -n jabref-function-${{ matrix.deployment_environment }} --src .output/server.zip shell: pwsh - name: Check HTTP status + shell: bash run: | - Start-Sleep -Seconds 30 + sleep 30 curl -s -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' ${{ matrix.url }} || true curl -s -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' ${{ matrix.url }}/api || true # The api returns 400 status code for some reason From 8daad5b4bead12ff4988205d906f62365c63d431 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 21:20:46 +0200 Subject: [PATCH 06/15] Update LandingPageDownload.client.vue Hard links to https://www.fosshub.com/JabRef.html --- components/LandingPageDownload.client.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 6482c898d..18a974441 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -30,7 +30,7 @@ Also available for mac OS X and Linux
@@ -41,7 +41,7 @@ Also available for Windows and Linux
@@ -52,7 +52,7 @@ Also available for mac OS X and Windows From fa91cb083bd87311af309f913d5d1a8e2c37a8bb Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 21:27:22 +0200 Subject: [PATCH 07/15] Update deploy.yml forward slash --- .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 33346c0a0..dbf25c194 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -62,7 +62,7 @@ jobs: # Delete old deployment (otherwise we get a spawn EBUSY error when running the workflow again) az staticwebapp environment delete --name jabref-online --environment-name ${{ github.event.pull_request.number }} --yes || true # Workaround for https://github.com/Azure/static-web-apps-cli/issues/557 and https://github.com/Azure/static-web-apps-cli/issues/565 - $output = yarn swa deploy .output\public --env ${{ github.event.pull_request.number }} --verbose=silly 2>&1 | Out-String + $output = yarn swa deploy .output/public --env ${{ github.event.pull_request.number }} --verbose=silly 2>&1 | Out-String Write-Host $output $match = $output | Select-String -Pattern 'Project deployed to (?.*) ' if ($match -eq $null) { exit 1 } From 9ced532c1c6d90226c5d838bd28aeba575f8b796 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 22:04:56 +0200 Subject: [PATCH 08/15] Update LandingPageDownload.client.vue use fosshub url directly --- components/LandingPageDownload.client.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 18a974441..5007f2af6 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -17,7 +17,7 @@ > Download JabRef From 3cbd088e4904101fc03afbab2a9d273ed679adfc Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 22:10:10 +0200 Subject: [PATCH 09/15] Update LandingPageDownload.client.vue fix link --- components/LandingPageDownload.client.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 5007f2af6..7d212d931 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -17,7 +17,7 @@ > Download JabRef From 3c0b75b5f9c7a1ba16351d6534c7883c83849fb6 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 22:22:34 +0200 Subject: [PATCH 10/15] Update index.vue Fix dl button href --- pages/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.vue b/pages/index.vue index 92f9642f4..7cc496236 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -77,7 +77,7 @@ Download JabRef From a51f8437543f5a07f3313008ca68341c147aba9e Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 22:51:56 +0200 Subject: [PATCH 11/15] Fix cursor and replace twitter with mastodon Fixes #2010 Fixes #1978 --- components/LandingPageFooter.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/LandingPageFooter.vue b/components/LandingPageFooter.vue index 4a9518a08..bfcd71106 100644 --- a/components/LandingPageFooter.vue +++ b/components/LandingPageFooter.vue @@ -69,6 +69,7 @@
  • Legal Notices @@ -78,6 +79,7 @@ Privacy Policy @@ -147,9 +149,9 @@
  • Mastodon > - Twitter + Mastodon
  • From 00e7c05dcf123a94e45cc13af29e8c751e476d89 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 21 Aug 2023 23:24:37 +0200 Subject: [PATCH 12/15] fix link --- components/LandingPageFooter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/LandingPageFooter.vue b/components/LandingPageFooter.vue index bfcd71106..8ab209658 100644 --- a/components/LandingPageFooter.vue +++ b/components/LandingPageFooter.vue @@ -149,7 +149,7 @@
  • Mastodon + rel="me" href="https://foojay.social/@jabref"> > Mastodon From 1fbd78b83733830ade81695905f2aa671132d002 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 4 Sep 2023 19:42:32 +0200 Subject: [PATCH 13/15] Update deploy.yml fix newline --- .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 32259531f..c12f1c9ae 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -110,4 +110,5 @@ jobs: - name: Run API tests run: yarn test:api env: - TEST_URL: ${{ matrix.url }} \ No newline at end of file + TEST_URL: ${{ matrix.url }} + From 7981d906153288c0536ce3375dd864a69cebb8bb Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Mon, 4 Sep 2023 21:07:49 +0200 Subject: [PATCH 14/15] order href --- components/LandingPageFooter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/LandingPageFooter.vue b/components/LandingPageFooter.vue index 8ab209658..80ffe5c1f 100644 --- a/components/LandingPageFooter.vue +++ b/components/LandingPageFooter.vue @@ -78,8 +78,8 @@
  • Privacy Policy From 6467bb593000f34894adc5be31a9a071fab8bbbd Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Mon, 4 Sep 2023 21:08:14 +0200 Subject: [PATCH 15/15] remove unused --- components/LandingPageDownload.client.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/components/LandingPageDownload.client.vue b/components/LandingPageDownload.client.vue index 7d212d931..cf0dd107a 100644 --- a/components/LandingPageDownload.client.vue +++ b/components/LandingPageDownload.client.vue @@ -78,5 +78,4 @@