From ec32913dabe0c3a9b845b7ad00fc1417c96991a9 Mon Sep 17 00:00:00 2001 From: Avital Pinnick Date: Wed, 30 Aug 2023 17:36:15 +0300 Subject: [PATCH] adding welcome to preview.yml (#778) --- .github/workflows/preview.yml | 39 +++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 79428caae..f5605a4a7 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -18,7 +18,7 @@ jobs: get: # The type of runner that the job will run on runs-on: ubuntu-latest - + # Steps represent a sequence of tasks that will be executed as part of the job steps: - uses: actions/checkout@v2 @@ -28,11 +28,11 @@ jobs: - uses: actions/checkout@v2 with: - ref: gh-pages + ref: gh-pages path: dest - + - name: whereami - run: | + run: | cd source pwd ls @@ -40,51 +40,54 @@ jobs: cd ${{ github.workspace }}/ pwd ls - - + + - uses: addnab/docker-run-action@v3 with: image: quay.io/rhn_support_gmcgoldr/levccutil - options: -v ${{ github.workspace }}:/work + options: -v ${{ github.workspace }}:/work shell: bash run: | cd /work/source/release_notes ccutil compile --lang en_US --type asciidoc --main-file master.adoc - cp -Rf /work/source/release_notes/build/tmp/en-US/html-single/* /work/dest/master/release_notes/ + cp -Rf /work/source/release_notes/build/tmp/en-US/html-single/* /work/dest/master/release_notes/ cd /work/source/deploy_quay ccutil compile --lang en_US --type asciidoc --main-file master.adoc cp -Rf /work/source/deploy_quay/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay/ cd /work/source/deploy_quay_on_openshift_op_tng ccutil compile --lang en_US --type asciidoc --main-file master.adoc - cp -Rf /work/source/deploy_quay_on_openshift_op_tng/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay_on_openshift_op_tng/ + cp -Rf /work/source/deploy_quay_on_openshift_op_tng/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay_on_openshift_op_tng/ cd /work/source/deploy_quay_ha ccutil compile --lang en_US --type asciidoc --main-file master.adoc cp -Rf /work/source/deploy_quay_ha/build/tmp/en-US/html-single/* /work/dest/master/deploy_quay_ha/ cd /work/source/config_quay ccutil compile --lang en_US --type asciidoc --main-file master.adoc - cp -Rf /work/source/config_quay/build/tmp/en-US/html-single/* /work/dest/master/config_quay/ + cp -Rf /work/source/config_quay/build/tmp/en-US/html-single/* /work/dest/master/config_quay/ cd /work/source/manage_quay ccutil compile --lang en_US --type asciidoc --main-file master.adoc - cp -Rf /work/source/manage_quay/build/tmp/en-US/html-single/* /work/dest/master/manage_quay/ + cp -Rf /work/source/manage_quay/build/tmp/en-US/html-single/* /work/dest/master/manage_quay/ cd /work/source/upgrade_quay ccutil compile --lang en_US --type asciidoc --main-file master.adoc - cp -Rf /work/source/upgrade_quay/build/tmp/en-US/html-single/* /work/dest/master/upgrade_quay/ + cp -Rf /work/source/upgrade_quay/build/tmp/en-US/html-single/* /work/dest/master/upgrade_quay/ cd /work/source/use_quay ccutil compile --lang en_US --type asciidoc --main-file master.adoc - cp -Rf /work/source/use_quay/build/tmp/en-US/html-single/* /work/dest/master/use_quay/ + cp -Rf /work/source/use_quay/build/tmp/en-US/html-single/* /work/dest/master/use_quay/ cd /work/source/api ccutil compile --lang en_US --type asciidoc --main-file master.adoc cp -Rf /work/source/api/build/tmp/en-US/html-single/* /work/dest/master/api/ cd /work/source/architecture ccutil compile --lang en_US --type asciidoc --main-file master.adoc cp -Rf /work/source/architecture/build/tmp/en-US/html-single/* /work/dest/master/architecture/ - + cd /work/source + ccutil compile --lang en_US --type asciidoc --main-file welcome.adoc + cp -RF /work/source/architecture/build/tmp/en-US/html-single/* /work/dest/master/ + - name: commit - run: | + run: | cd dest git status - git config --local user.email "action@github.com" + git config --local user.email "action@github.com" git config --local user.name "GitHub Action" #git diff #git diff-index --quiet HEAD || (git commit -a -m 'DOCS Auto-update' --allow-empty && git push -f) @@ -98,8 +101,8 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages directory: dest - - + + # Runs a single command using the runners shell # docker run -ti --rm --privileged -v source:/source quay.io/rhn_support_gmcgoldr/levccutil "/bin/bash cd /source/deploy_quay; ls; ccutil compile --lang en_US --type asciidoc --main-file master.adoc; ls -al "