From 75bc71d2fb2ff7941c6a2858343b8f79e0de6715 Mon Sep 17 00:00:00 2001 From: BreizhHardware Date: Thu, 17 Oct 2024 10:50:44 +0200 Subject: [PATCH] Fix wrong env naming for unit test --- .github/codeql/codeql-analysis.yml | 4 --- .github/codeql/codeql-config.yml | 4 --- .github/workflows/codeQL.yml | 41 ++++++++++++++++++++++++++++++ .github/workflows/deploy-test.yml | 15 +++++++++-- 4 files changed, 54 insertions(+), 10 deletions(-) delete mode 100644 .github/codeql/codeql-analysis.yml delete mode 100644 .github/codeql/codeql-config.yml create mode 100644 .github/workflows/codeQL.yml diff --git a/.github/codeql/codeql-analysis.yml b/.github/codeql/codeql-analysis.yml deleted file mode 100644 index 2d7e956..0000000 --- a/.github/codeql/codeql-analysis.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: "Default setup" -queries: - - javascript-security-and-quality.qls - - typescript-security-and-quality.qls \ No newline at end of file diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml deleted file mode 100644 index 2d7e956..0000000 --- a/.github/codeql/codeql-config.yml +++ /dev/null @@ -1,4 +0,0 @@ -name: "Default setup" -queries: - - javascript-security-and-quality.qls - - typescript-security-and-quality.qls \ No newline at end of file diff --git a/.github/workflows/codeQL.yml b/.github/workflows/codeQL.yml new file mode 100644 index 0000000..02b2966 --- /dev/null +++ b/.github/workflows/codeQL.yml @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + schedule: + - cron: '0 0 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript', 'typescript' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 \ No newline at end of file diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index 4b7a49b..857e724 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -8,7 +8,7 @@ on: jobs: build-test: runs-on: ubuntu-latest - environment: production + environment: recette steps: - name: Checkout code @@ -44,4 +44,15 @@ jobs: uses: actions/upload-artifact@v4 with: name: cypress-screenshots - path: cypress/screenshots \ No newline at end of file + path: cypress/screenshots + + - name: Copy build directory to server + uses: Dylan700/sftp-upload-action@v1.2.3 + with: + server: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + password: ${{ secrets.SERVER_PASSWORD }} + port: ${{ secrets.SERVER_PORT }} + uploads: | + ./dist => /webroot/ + dry-run: true \ No newline at end of file