From 9219756e436f11488aaceb8b159861972558447f Mon Sep 17 00:00:00 2001 From: Nabin Kawan Date: Mon, 22 Apr 2024 10:15:44 +0545 Subject: [PATCH 1/3] Test deploy token --- .github/workflows/test_integration_playwright.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_integration_playwright.yml b/.github/workflows/test_integration_playwright.yml index 87ce009d7..d7f0ff4aa 100644 --- a/.github/workflows/test_integration_playwright.yml +++ b/.github/workflows/test_integration_playwright.yml @@ -78,7 +78,7 @@ jobs: ref: gh-pages path: gh-pages repository: ${{vars.GH_PAGES}} - token: ${{ secrets.PERSONAL_TOKEN }} + ssh-key: ${{ secrets.DEPLOY_KEY }} - name: Register report id: register-project @@ -89,7 +89,7 @@ jobs: - if: steps.register-project.outputs.project_exists != 'true' uses: JamesIves/github-pages-deploy-action@v4 with: - token: ${{ secrets.PERSONAL_TOKEN }} + ssh-key: ${{ secrets.DEPLOY_KEY }} repository-name: ${{vars.GH_PAGES}} branch: gh-pages folder: project @@ -121,7 +121,7 @@ jobs: - name: Deploy report to Github Pages uses: JamesIves/github-pages-deploy-action@v4 with: - token: ${{ secrets.PERSONAL_TOKEN }} + ssh-key: ${{ secrets.DEPLOY_KEY }} repository-name: ${{vars.GH_PAGES}} branch: gh-pages folder: build From db1ddb2518124d035d3a447bb60d2fc761ebaafa Mon Sep 17 00:00:00 2001 From: Nabin Kawan Date: Mon, 22 Apr 2024 10:35:42 +0545 Subject: [PATCH 2/3] Add env and readme for deploy key setup --- .../govtool-frontend/playwright/.env.example | 18 ++++++++++++ tests/govtool-frontend/playwright/README.md | 29 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/govtool-frontend/playwright/.env.example create mode 100644 tests/govtool-frontend/playwright/README.md diff --git a/tests/govtool-frontend/playwright/.env.example b/tests/govtool-frontend/playwright/.env.example new file mode 100644 index 000000000..c5f2ff3d1 --- /dev/null +++ b/tests/govtool-frontend/playwright/.env.example @@ -0,0 +1,18 @@ +FRONTEND_URL=http://localhost:8080 +API_URL=http://localhost:8080/api + +DOCS_URL=https://docs.sanchogov.tools + +# 1 for testnet, 0 for mainnet +NETWORK_ID=1, + +# Create mock wallets if true +ONE_TIME_WALLET_SETUP=false, + +# Faucet +FAUCET_API_URL=https://faucet.sanchonet.world.dev.cardano.org +FAUCET_API_KEY= + +# Kuber +KUBER_API_URL=https://sanchonet.kuber.cardanoapi.io +KUBER_API_KEY= \ No newline at end of file diff --git a/tests/govtool-frontend/playwright/README.md b/tests/govtool-frontend/playwright/README.md new file mode 100644 index 000000000..47a5edca3 --- /dev/null +++ b/tests/govtool-frontend/playwright/README.md @@ -0,0 +1,29 @@ +# GitHub Pages Deployment SSH Deploy Key Generation Guide + +This guide walks you through the process of generating an SSH deploy key for GitHub Pages deployment and securely integrating it into your workflow. + +## Generating the SSH Deploy Key + +Execute the following command in your terminal to generate the SSH deploy key: + +```bash +ssh-keygen -t rsa -b 4096 -C "$(git config user.email)" -f gh-pages -N "" +``` + +This command will generate two files: + +- `gh-pages.pub`: Public key +- `gh-pages`: Private key + +## Integration Steps + +1. **Repository Settings:** + + - Navigate to your repository settings. + +2. **Adding Public Key to Deploy Keys: Add to** [`https://github.com/cardanoapi/govtool-test-reports`](https://github.com/cardanoapi/govtool-test-reports) + + - Go to Deploy Keys and add your public key. Make sure to grant it write access. + +3. **Adding Private Key to Secrets:** + - Go to Secrets and add your private key as `DEPLOY_KEY`. From 5a70c942515018e84adb9e5eb8aab28544638e27 Mon Sep 17 00:00:00 2001 From: Nabin Kawan Date: Fri, 3 May 2024 15:02:06 +0545 Subject: [PATCH 3/3] Update env variables --- .github/workflows/test_integration_playwright.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_integration_playwright.yml b/.github/workflows/test_integration_playwright.yml index d7f0ff4aa..f9e10d27b 100644 --- a/.github/workflows/test_integration_playwright.yml +++ b/.github/workflows/test_integration_playwright.yml @@ -50,14 +50,14 @@ jobs: path: tests/govtool-frontend/playwright/allure-results env: - FRONTEND_URL: ${{vars.FRONTEND_URL}} - API_URL: ${{vars.API_URL}} + FRONTEND_URL: ${{vars.HOST_URL}} + API_URL: ${{vars.HOST_URL}}/api DOCS_URL: ${{ vars.DOCS_URL }} FAUCET_API_URL: ${{ vars.FAUCET_API_URL }} FAUCET_API_KEY: ${{secrets.FAUCET_API_KEY}} KUBER_API_URL: ${{vars.KUBER_API_URL}} KUBER_API_KEY: ${{secrets.KUBER_API_KEY}} - WORKERS: ${{vars.WORKERS}} + WORKERS: ${{vars.TEST_WORKERS}} publish-report: runs-on: ubuntu-latest