diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 69ded8a..b78769a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,15 +5,13 @@ on: workflows: [ 'Playwright tests' ] types: [ completed ] branches: [ devel, main ] -env: - SERVER_USER: root - QS_SERVER_IP: 128.140.75.240 - PROD_SERVER_IP: 116.203.122.75 jobs: deploy: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} + environment: ${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} + steps: - uses: actions/checkout@v4 with: @@ -27,14 +25,14 @@ jobs: - name: Install SSH Key uses: shimataro/ssh-key-action@v2 with: - key: ${{ github.event.workflow_run.head_branch == 'devel' && secrets.QS_SSH_KEY || secrets.PROD_SSH_KEY }} - known_hosts: ${{ github.event.workflow_run.head_branch == 'devel' && secrets.QS_KNOWN_HOSTS || secrets.PROD_KNOWN_HOSTS }} + key: ${{ secrets.SSH_KEY }} + known_hosts: ${{ vars.KNOWN_HOSTS }} - name: Deploy to demo server run: | nix run nixpkgs#nixos-rebuild -- switch \ - --flake .#${{ github.event.workflow_run.head_branch == 'devel' && 'qs' || 'prod' }} \ + --flake .#${{ vars.FLAKE_CONFIGURATION_NAME }} \ --fast \ - --build-host ${{ env.SERVER_USER }}@${{ github.event.workflow_run.head_branch == 'devel' && env.QS_SERVER_IP || env.PROD_SERVER_IP }} \ - --target-host ${{ env.SERVER_USER }}@${{ github.event.workflow_run.head_branch == 'devel' && env.QS_SERVER_IP || env.PROD_SERVER_IP }} \ + --build-host ${{ vars.SERVER_DEPLOY_USER }}@${{ vars.PUBLIC_SERVER_IP }} \ + --target-host ${{ vars.SERVER_DEPLOY_USER }}@${{ vars.PUBLIC_SERVER_IP }} \ --use-remote-sudo diff --git a/web-app/playwright.config.ts b/web-app/playwright.config.ts index 436b260..89f8750 100644 --- a/web-app/playwright.config.ts +++ b/web-app/playwright.config.ts @@ -11,6 +11,7 @@ const config: PlaywrightTestConfig = { }, testDir: "./tests", testMatch: /(.+\.)?(test|spec)\.ts/, + retries: 3, // https://github.com/NixOS/nixpkgs/issues/288826 projects: [ { diff --git a/web-app/src/routes/(authenticated)/manage/+page.svelte b/web-app/src/routes/(authenticated)/manage/+page.svelte index 4ebd645..a85faac 100644 --- a/web-app/src/routes/(authenticated)/manage/+page.svelte +++ b/web-app/src/routes/(authenticated)/manage/+page.svelte @@ -39,7 +39,7 @@
- {#each data.usersWithWebsites as { id, created_at, username, max_number_websites, website }} + {#each data.usersWithWebsites as { id, created_at, username, max_number_websites, website } (id)}{category_name} ({category_weight}) diff --git a/web-app/src/routes/(authenticated)/website/[websiteId]/collaborators/+page.svelte b/web-app/src/routes/(authenticated)/website/[websiteId]/collaborators/+page.svelte index 12b95b1..ef52777 100644 --- a/web-app/src/routes/(authenticated)/website/[websiteId]/collaborators/+page.svelte +++ b/web-app/src/routes/(authenticated)/website/[websiteId]/collaborators/+page.svelte @@ -65,7 +65,7 @@
{user?.username} ({permission_level}) diff --git a/web-app/src/routes/(authenticated)/website/[websiteId]/logs/+page.svelte b/web-app/src/routes/(authenticated)/website/[websiteId]/logs/+page.svelte index 9e1a3c9..5638206 100644 --- a/web-app/src/routes/(authenticated)/website/[websiteId]/logs/+page.svelte +++ b/web-app/src/routes/(authenticated)/website/[websiteId]/logs/+page.svelte @@ -111,7 +111,7 @@