From ed2ccdfc3ed8b5ab6c73dfbebce796bca43c9f49 Mon Sep 17 00:00:00 2001 From: adamas Date: Mon, 17 Feb 2025 16:51:09 +0100 Subject: [PATCH] Actualiser .github/workflows/act.yml --- .github/workflows/act.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/act.yml b/.github/workflows/act.yml index 3df29a0..56206c0 100644 --- a/.github/workflows/act.yml +++ b/.github/workflows/act.yml @@ -4,3 +4,34 @@ on: - 'master' jobs: + build: + runs-on: ubuntu-latest + name: Test CV Web Dumas + steps: + - uses: https://github.com/actions/checkout@v4 + - name: Install requirements + run: npm ci + - name: Run tests and collect coverage + run: npm run test + - name: Upload coverage reports to Codecov + run: | + # Replace `linux` below with the appropriate OS + # Options are `alpine`, `linux`, `macos`, `windows` + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -t ${CODECOV_TOKEN} + deploy_to_main: + name: Deploy app to the Multirisque main setup + runs-on: self-hosted + steps: + - name: Check out the repo + uses: https://github.com/actions/checkout@v4 + - name: SSH Command + uses: https://github.com/D3rHase/ssh-command-action@v0.2.2 + with: + host: ${{secrets.HOST}} # Remote server address / ip - required + port: ${{secrets.PORT}} # Remote server port - Default: 22 - optional + user: ${{secrets.USER}} # Remote server user - required + private_key: ${{secrets.PRIVATE_KEY}} # Private ssh key registered on the remote server - required + host_fingerprint: ${{secrets.HOST_FINGERPRINT}} # Public ssh key fingerprint, viewable via ssh-keyscan -H $HOST -p $PORT - optional + command: cd ./docker-data/perso/ && ./updateCV.sh # Command to be executed - Default: echo 'hello world' \ No newline at end of file