From a3d8f18ad29b4a6e97e01055eddfd873a92eeced Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 20:14:05 +0100 Subject: [PATCH 1/9] simulate publish GH pages --- .github/workflows/createBundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index ed5bd54..3b61bec 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -365,7 +365,7 @@ jobs: # inspired by https://nimblehq.co/blog/create-github-wiki-pull-request publish-help: - if: github.event_name == 'release' + # if: github.event_name == 'release' name: Publish help runs-on: ubuntu-20.04 needs: tests From 6a0b4fd4ce2ca466e58036a202793336b6638702 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 20:18:51 +0100 Subject: [PATCH 2/9] sim --- .github/workflows/createBundle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index 3b61bec..9052c95 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ "main", "release/*" , "tests-*"] + branches: [ "main", "release/*" , "tests-*", "simulate-*"] # tags: ["v*"] pull_request: branches: [ "main", "release/*" ] From 3b5d51e7850ba9435eaed4ccbdc9bdac5f506ade Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 21:11:38 +0100 Subject: [PATCH 3/9] deploy-pages --- .github/workflows/createBundle.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index 9052c95..9e93c3e 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -376,12 +376,13 @@ jobs: name: html-help path: ${{github.workspace}}/public/ - - name: Publish GitHub pages help - uses: peaceiris/actions-gh-pages@v3 - # If you're changing the branch from main, - # also change the `main` in `refs/heads/main` - # below accordingly. - # if: github.ref == 'refs/heads/main' + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 with: - github_token: ${{ secrets.WIKI_ACTION_TOKEN }} - publish_dir: ./public + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3 From 77ac2e4513c7219a753bafbfea2903b267f2ec18 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 21:39:07 +0100 Subject: [PATCH 4/9] gh-pages fix --- .github/workflows/createBundle.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index 9e93c3e..5e6dfa3 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -9,6 +9,12 @@ on: release: types: [published] +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release @@ -366,6 +372,9 @@ jobs: # inspired by https://nimblehq.co/blog/create-github-wiki-pull-request publish-help: # if: github.event_name == 'release' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} name: Publish help runs-on: ubuntu-20.04 needs: tests From 9c961e55352587c1f76938fc2b9ad4112bc8b751 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 21:46:18 +0100 Subject: [PATCH 5/9] ubuntu-latest --- .github/workflows/createBundle.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index 5e6dfa3..bea15ca 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -176,7 +176,7 @@ jobs: options: --user root credentials: username: mpokornyetm - password: ${{ secrets.DOCKER_CONTAINER_REGISTRY_TOKEN }} + password: ${{ secrets.DOCKER_CONTAINER_REGISTRY_TOKEN }} steps: - name: Install doxygen working-directory: /opt/WinCC_OA/3.19/bin/ @@ -270,7 +270,7 @@ jobs: options: --user root credentials: username: mpokornyetm - password: ${{ secrets.DOCKER_CONTAINER_REGISTRY_TOKEN }} + password: ${{ secrets.DOCKER_CONTAINER_REGISTRY_TOKEN }} needs: [build, package] steps: @@ -376,14 +376,14 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} name: Publish help - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest needs: tests steps: - name: Download help uses: actions/download-artifact@v3 with: name: html-help - path: ${{github.workspace}}/public/ + path: ${{github.workspace}}/ - name: Setup Pages uses: actions/configure-pages@v4 From 155346857ef4fada06d154cf3d41bd3bcfbbdc13 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 21:50:51 +0100 Subject: [PATCH 6/9] download-artifac --- .github/workflows/createBundle.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index bea15ca..80de1c6 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -369,7 +369,6 @@ jobs: with: files: WinCCOA_QualityChecks_${{ github.event.release.tag_name }}.zip -# inspired by https://nimblehq.co/blog/create-github-wiki-pull-request publish-help: # if: github.event_name == 'release' environment: @@ -385,13 +384,13 @@ jobs: name: html-help path: ${{github.workspace}}/ - - name: Setup Pages - uses: actions/configure-pages@v4 - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - # Upload entire repository - path: '.' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v3 + # - name: Setup Pages + # uses: actions/configure-pages@v4 + # - name: Upload artifact + # uses: actions/upload-pages-artifact@v2 + # with: + # # Upload entire repository + # path: '.' + # - name: Deploy to GitHub Pages + # id: deployment + # uses: actions/deploy-pages@v3 From 9cdfe65beca91377bcff03401dcc7b01def2fdc7 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 22:37:26 +0100 Subject: [PATCH 7/9] static pages --- .github/workflows/createBundle.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index 80de1c6..02ba1e2 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -369,11 +369,10 @@ jobs: with: files: WinCCOA_QualityChecks_${{ github.event.release.tag_name }}.zip + +# inspired by https://nimblehq.co/blog/create-github-wiki-pull-request publish-help: - # if: github.event_name == 'release' - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + # if: github.event_name == 'release' name: Publish help runs-on: ubuntu-latest needs: tests @@ -382,15 +381,14 @@ jobs: uses: actions/download-artifact@v3 with: name: html-help - path: ${{github.workspace}}/ - - # - name: Setup Pages - # uses: actions/configure-pages@v4 - # - name: Upload artifact - # uses: actions/upload-pages-artifact@v2 - # with: - # # Upload entire repository - # path: '.' - # - name: Deploy to GitHub Pages - # id: deployment - # uses: actions/deploy-pages@v3 + path: ${{github.workspace}}/docs/ + + - name: Publish GitHub pages help + uses: peaceiris/actions-gh-pages@v3 + # If you're changing the branch from main, + # also change the `main` in `refs/heads/main` + # below accordingly. + # if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.WIKI_ACTION_TOKEN }} + publish_dir: ./docs From 9d5de28fecdc18c82ecf764d70bf6613e06abc5a Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 22:44:37 +0100 Subject: [PATCH 8/9] todo --- .github/workflows/createBundle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index 02ba1e2..f1a8d4d 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -372,6 +372,7 @@ jobs: # inspired by https://nimblehq.co/blog/create-github-wiki-pull-request publish-help: +# !! TODO enable it only on release # if: github.event_name == 'release' name: Publish help runs-on: ubuntu-latest From 9f101eaf0b2e6dff24550955e6ed8b61f9cc5964 Mon Sep 17 00:00:00 2001 From: Pokorny Martin Date: Sun, 17 Dec 2023 22:47:50 +0100 Subject: [PATCH 9/9] workflow rules --- .github/workflows/createBundle.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/createBundle.yml b/.github/workflows/createBundle.yml index f1a8d4d..4f564a0 100644 --- a/.github/workflows/createBundle.yml +++ b/.github/workflows/createBundle.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ "main", "release/*" , "tests-*", "simulate-*"] + branches: [ "main", "release/*" , "feature/*"] # tags: ["v*"] pull_request: branches: [ "main", "release/*" ] @@ -386,10 +386,6 @@ jobs: - name: Publish GitHub pages help uses: peaceiris/actions-gh-pages@v3 - # If you're changing the branch from main, - # also change the `main` in `refs/heads/main` - # below accordingly. - # if: github.ref == 'refs/heads/main' with: github_token: ${{ secrets.WIKI_ACTION_TOKEN }} publish_dir: ./docs