You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2021/04/28 08:56:38 UTC

[camel-website] branch main updated: fix(github): preview workflow

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 3470fa1  fix(github): preview workflow
3470fa1 is described below

commit 3470fa10dc7e9ae8f973a03cba2dfeecd6604629
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Wed Apr 28 10:56:25 2021 +0200

    fix(github): preview workflow
    
    Seems that we need to checkout first and then download and unzip the
    website artifact, also removes the head ref from the comment, perhaps
    that'll be restored sometime in the future.
---
 .github/workflows/preview.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml
index d86ff56..325166a 100644
--- a/.github/workflows/preview.yaml
+++ b/.github/workflows/preview.yaml
@@ -28,6 +28,8 @@ jobs:
     runs-on: ubuntu-latest
     if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
     steps:
+      - name: Checkout
+        uses: actions/checkout@v2
       - name: Download pull request artifact
         uses: actions/github-script@v4
         with:
@@ -49,9 +51,7 @@ jobs:
             const fs = require('fs');
             fs.writeFileSync('${{github.workspace}}/website.zip', Buffer.from(download.data));
       - name: Unzip website artifact
-        run: unzip website.zip
-      - name: Checkout
-        uses: actions/checkout@v2
+        run: unzip -q website.zip
       - name: Preview on Netlify
         env:
           NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
@@ -67,5 +67,5 @@ jobs:
               issue_number: context.issue.number,
               owner: context.repo.owner,
               repo: context.repo.repo,
-              body: `🚀 Preview for ${context.payload.pull_request.head.sha} is available at ${process.env.DEPLOY_URL}`
+              body: `🚀 Preview is available at ${process.env.DEPLOY_URL}`
             })