You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ru...@apache.org on 2022/02/08 18:07:35 UTC

[iceberg-docs] 16/47: Replace toml action with simple sed command (#15)

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

russellspitzer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-docs.git

commit 8cc602740e1924bf7429a132fe78cb4c310f3cf5
Author: Samuel Redai <43...@users.noreply.github.com>
AuthorDate: Sun Jan 16 13:29:38 2022 -0500

    Replace toml action with simple sed command (#15)
---
 .github/workflows/deploy.yml | 42 +++++++++++++++++-------------------------
 landing-page/config.toml     |  1 +
 2 files changed, 18 insertions(+), 25 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 48ac455..18e10bd 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -13,19 +13,15 @@ jobs:
         id: vars
         run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
 
-      - name: Set baseURL in config.toml
-        uses: ciiiii/toml-editor@1.0.0
-        with:
-          file: "landing-page/config.toml"
-          key: "baseURL"
-          value: "https://iceberg.apache.org/"
+      - name: Set baseURL in landing-page/config.toml
+        run: |
+          sed -i -e 's|baseURL = ""|baseURL = "https://iceberg\.apache\.org/"|g' landing-page/config.toml
+          cat landing-page/config.toml
 
-      - name: Set params.docsBaseURL in config.toml
-        uses: ciiiii/toml-editor@1.0.0
-        with:
-          file: "landing-page/config.toml"
-          key: "params.docsBaseURL"
-          value: "https://iceberg.apache.org/docs/${{ steps.vars.outputs.branch_name }}"
+      - name: Set params.docsBaseURL in landing-page/config.toml
+        run: |
+          sed -i -e 's|docsBaseURL = ""|docsBaseURL = "https://iceberg\.apache\.org/docs/${{ steps.vars.outputs.branch_name }}"|g' landing-page/config.toml
+          cat landing-page/config.toml
 
       - name: Setup Hugo
         uses: peaceiris/actions-hugo@v2
@@ -63,20 +59,16 @@ jobs:
         id: vars
         run: echo ::set-output name=branch_name::${GITHUB_REF#refs/*/}
 
-      - name: Set baseURL in config.toml
-        uses: ciiiii/toml-editor@1.0.0
-        with:
-          file: "docs/config.toml"
-          key: "baseURL"
-          value: "https://iceberg.apache.org/docs/${{ steps.vars.outputs.branch_name }}"
+      - name: Set baseURL in docs/config.toml
+        run: |
+          sed -i -e 's|baseURL = ""|baseURL = "https://iceberg\.apache\.org/docs/${{ steps.vars.outputs.branch_name }}"|g' docs/config.toml
+          cat docs/config.toml
+
+      - name: Set params.versions.iceberg in docs/config.toml
+        run: |
+          sed -i -e 's|versions\.iceberg = ""|versions\.iceberg = "${{ steps.vars.outputs.branch_name }}"|g' docs/config.toml
+          cat docs/config.toml
 
-      - name: Set params.version in config.toml
-        uses: ciiiii/toml-editor@1.0.0
-        with:
-          file: "docs/config.toml"
-          key: "params.versions.iceberg"
-          value: "${{ steps.vars.outputs.branch_name }}"
-      
       - name: Setup Hugo
         uses: peaceiris/actions-hugo@v2
         with:
diff --git a/landing-page/config.toml b/landing-page/config.toml
index 3591763..a9be5fd 100644
--- a/landing-page/config.toml
+++ b/landing-page/config.toml
@@ -5,6 +5,7 @@ title = "Apache Iceberg"
 [params]
   description = "The open table format for analytic datasets."
   latestVersions.iceberg = "0.12.1"
+  docsBaseURL = ""
 
 [[params.social]]
   title = "Community"