From 597581128fd39e44c86bba81bd649b1dc1336e5f Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Mon, 27 May 2024 03:24:47 +0530 Subject: [PATCH] ci/cd: use strip_components to fix up and simplify scp file transfer --- .github/workflows/ci-push.yml | 16 ++++------------ .github/workflows/docs-deploy.yml | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-push.yml b/.github/workflows/ci-push.yml index ae496b8..93d0722 100644 --- a/.github/workflows/ci-push.yml +++ b/.github/workflows/ci-push.yml @@ -90,18 +90,10 @@ jobs: - name: Upload coverage reports to Toolforge uses: appleboy/scp-action@9ba62064d28ce0897a970e72cdfe30b9fde2fe48 with: - source: /home/runner/work/mwn/mwn/coverage.zip - target: /data/project/mwn - host: login.toolforge.org - username: ${{ secrets.TOOLFORGE_USERNAME }} - key: ${{ secrets.TOOLFORGE_PRIVATE_KEY }} - - name: Coverage - uses: appleboy/ssh-action@551964ebda1034f0b5449d74db25c42e371ca1f7 - with: - script: | - cd /data/project/mwn - rm -rf www/static/coverage - unzip coverage.zip -d www/static + source: ${{github.workspace}}/coverage/* + strip_components: 3 + target: /data/project/mwn/www/static/coverage + rm: true host: login.toolforge.org username: ${{ secrets.TOOLFORGE_USERNAME }} key: ${{ secrets.TOOLFORGE_PRIVATE_KEY }} diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 12fc900..5a9a172 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -33,6 +33,7 @@ jobs: uses: appleboy/scp-action@9ba62064d28ce0897a970e72cdfe30b9fde2fe48 with: source: ${{github.workspace}}/website/build/docs.zip + strip_components: 4 target: /data/project/mwn host: login.toolforge.org username: ${{secrets.TOOLFORGE_USERNAME}}