You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/11 02:47:37 UTC

[GitHub] [apisix-website] juzhiyuan opened a new pull request #86: fix: CD

juzhiyuan opened a new pull request #86:
URL: https://github.com/apache/apisix-website/pull/86


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527351627



##########
File path: .github/workflows/deploy.yml
##########
@@ -29,8 +31,7 @@ jobs:
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
         cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'

Review comment:
       The correct link is `https://apisix.apache.org/images/xxxx.png`
   
   ## Cases
   - ```![flow-load-plugin](./images/flow-load-plugin.png)```
   - ```![](images/aws-fargate-cdk.png)```
   - ```![](../../doc/images/plugin/grafana_1.png)```
   - ```![](../../images/plugin/zipkin-2.png)```
   
   Once those cases above have been resolved, then all current pictures will show normally.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527351627



##########
File path: .github/workflows/deploy.yml
##########
@@ -29,8 +31,7 @@ jobs:
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
         cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'

Review comment:
       ## Cases
   - ```![flow-load-plugin](./images/flow-load-plugin.png)```
   - ```![](images/aws-fargate-cdk.png)```
   - ```![](../../doc/images/plugin/grafana_1.png)```
   - ```![](../../images/plugin/zipkin-2.png)```
   
   Once those cases above have been resolved, then all current pictures will show normally.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#issuecomment-731674893


   If there has one proper regex, we could fix this issue more easily. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527350973



##########
File path: .github/workflows/deploy.yml
##########
@@ -29,8 +31,7 @@ jobs:
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
         cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'

Review comment:
       I'm using the following regex.
   
   ```(\.\.\/|\.\/)+?(\w+\/)?images```
   
   ![image](https://user-images.githubusercontent.com/2106987/99749466-95109200-2b19-11eb-9223-302c5a55d747.png)
   
   The correct link is `https://apisix.apache.org/images/xxxx.png`
   
   ## Cases
   - ```![flow-load-plugin](./images/flow-load-plugin.png)```
   - ```![](images/aws-fargate-cdk.png)```
   - ```![](../../doc/images/plugin/grafana_1.png)```
   - ```![](../../images/plugin/zipkin-2.png)```
   
   Once those cases above have been resolved, then all current pictures will show normally.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527612881



##########
File path: .github/workflows/deploy.yml
##########
@@ -28,15 +28,20 @@ jobs:
         git clone https://github.com/apache/apisix.git
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
-        cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
 
     - name: Build
       run: cd website && yarn && yarn build
       
     - name: Copy files
-      run: cd website && cd build && cd apisix-website && cp ../../../README.md ./ && cp ../../../.asf.yaml ./
+      run: |
+        cd website/build/apisix-website
+        cp ../../../README.md ./ && cp ../../../.asf.yaml ./
+        cd apisix
+        find . -type f -name "*.html" -print0 | xargs -0 sed -i -e 's/src="\.\.\/\.\.\/doc\/images/src="https:\/\/apisix\.apache\.org\/images/g'

Review comment:
       Ugly but works.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527350973



##########
File path: .github/workflows/deploy.yml
##########
@@ -29,8 +31,7 @@ jobs:
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
         cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'

Review comment:
       ```(\.\.\/|\.\/)+?(\w+\/)?images```
   
   ![image](https://user-images.githubusercontent.com/2106987/99749466-95109200-2b19-11eb-9223-302c5a55d747.png)
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527354165



##########
File path: .github/workflows/deploy.yml
##########
@@ -7,6 +7,8 @@ name: CI
 on:
   push:
     branches: [ master ]
+  pull_request:
+    branches: [ master ]

Review comment:
       This should be omitted before merging.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527384066



##########
File path: .github/workflows/deploy.yml
##########
@@ -28,15 +30,23 @@ jobs:
         git clone https://github.com/apache/apisix.git
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
-        cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        # cd ./docs/apisix
+        # find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'
 
     - name: Build
       run: cd website && yarn && yarn build
       
     - name: Copy files
-      run: cd website && cd build && cd apisix-website && cp ../../../README.md ./ && cp ../../../.asf.yaml ./
+      run: |

Review comment:
       ugly but may work 🤔 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527351627



##########
File path: .github/workflows/deploy.yml
##########
@@ -29,8 +31,7 @@ jobs:
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
         cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'

Review comment:
       - ````![flow-load-plugin](./images/flow-load-plugin.png)```
   - ```![](images/aws-fargate-cdk.png)```
   - ```![](../../doc/images/plugin/grafana_1.png)```
   - ```![](../../images/plugin/zipkin-2.png)```
   
   Once those cases above have been resolved, then all current pictures will show normally.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r528198866



##########
File path: .github/workflows/deploy.yml
##########
@@ -28,15 +28,20 @@ jobs:
         git clone https://github.com/apache/apisix.git
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
-        cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
 
     - name: Build
       run: cd website && yarn && yarn build
       
     - name: Copy files
-      run: cd website && cd build && cd apisix-website && cp ../../../README.md ./ && cp ../../../.asf.yaml ./
+      run: |
+        cd website/build/apisix-website
+        cp ../../../README.md ./ && cp ../../../.asf.yaml ./
+        cd apisix
+        find . -type f -name "*.html" -print0 | xargs -0 sed -i -e 's/src="\.\.\/\.\.\/doc\/images/src="https:\/\/apisix\.apache\.org\/images/g'

Review comment:
       refer to https://github.com/apache/apisix-website/pull/86#discussion_r527350973




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan merged pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #86:
URL: https://github.com/apache/apisix-website/pull/86


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #86: fix(CD): deploy with correct images

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #86:
URL: https://github.com/apache/apisix-website/pull/86#discussion_r527350973



##########
File path: .github/workflows/deploy.yml
##########
@@ -29,8 +31,7 @@ jobs:
         cp -r apisix/doc/images ./website/static && rm -rf apisix/doc/images
         cp -r apisix/doc ./docs/apisix
         cd ./docs/apisix
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
-        find . -type f -name "*.md" -print0 | xargs -0 sed -i '' -e 's/\.\/images/https\:\/\/apisix\.apache\.org\/images/g'
+        find . -type f -name "*.md" -print0 | xargs -0 sed -i -e 's/(\.\.\/|\.\/)+?(\w+\/)?images/https\:\/\/apisix\.apache\.org\/images/g'

Review comment:
       ```(\.\.\/|\.\/)+?(\w+\/)?images```
   
   ![image](https://user-images.githubusercontent.com/2106987/99749466-95109200-2b19-11eb-9223-302c5a55d747.png)
   
   The correct link is `https://apisix.apache.org/images/xxxx.png`
   
   ## Cases
   - ```![flow-load-plugin](./images/flow-load-plugin.png)```
   - ```![](images/aws-fargate-cdk.png)```
   - ```![](../../doc/images/plugin/grafana_1.png)```
   - ```![](../../images/plugin/zipkin-2.png)```
   
   Once those cases above have been resolved, then all current pictures will show normally.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org