diff --git a/.github/codeql/codeql-analysis.yml b/.github/codeql/codeql-analysis.yml new file mode 100644 index 0000000..2d7e956 --- /dev/null +++ b/.github/codeql/codeql-analysis.yml @@ -0,0 +1,4 @@ +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 new file mode 100644 index 0000000..2d7e956 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,4 @@ +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/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 0000000..b06b183 --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,39 @@ +name: Deploy to server + +on: + push: + branches: + - '**' + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + environment: recette + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies and build + run: | + npm ci + npm run build + + - 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 => /var/www/modelec.club + dry-run: true + delete: true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3864db9..59fe4f0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,3 +35,4 @@ jobs: port: ${{ secrets.SERVER_PORT }} uploads: | ./dist => /var/www/modelec.club + delete: true \ No newline at end of file