From d5ee932e5b4de7747dc569fb80cf938d353a84ac Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Wed, 17 Jan 2024 21:37:50 -0700 Subject: [PATCH 1/4] Add write permissions for pages workflow Signed-off-by: Ryan Friedman --- .github/workflows/doxygen.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index 695b668..05a8de7 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -1,6 +1,8 @@ -name: Build Test +name: Doxygen Pages on: push: + branches: + - 'ros2' pull_request: branches: - '*' @@ -10,6 +12,8 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false + permissions: + contents: write steps: - uses: actions/checkout@v4 - uses: mattnotmitt/doxygen-action@v1.9.5 From d7aa3c24a5d9f2d23f446d7c94c860e1b34d2eae Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Wed, 17 Jan 2024 21:44:11 -0700 Subject: [PATCH 2/4] Change to two separate workflows * Build runs like normal without the deploy * Deploy only runs on the ros2 branch * Reused workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows Signed-off-by: Ryan Friedman --- .../{doxygen.yml => doxygen_build.yml} | 10 ++-------- .github/workflows/doxygen_deploy.yml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) rename .github/workflows/{doxygen.yml => doxygen_build.yml} (54%) create mode 100644 .github/workflows/doxygen_deploy.yml diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen_build.yml similarity index 54% rename from .github/workflows/doxygen.yml rename to .github/workflows/doxygen_build.yml index 05a8de7..8190357 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen_build.yml @@ -1,24 +1,18 @@ -name: Doxygen Pages +name: Doxygen Build on: push: branches: - 'ros2' pull_request: branches: - - '*' + - '*' jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false - permissions: - contents: write steps: - uses: actions/checkout@v4 - uses: mattnotmitt/doxygen-action@v1.9.5 - - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./html diff --git a/.github/workflows/doxygen_deploy.yml b/.github/workflows/doxygen_deploy.yml new file mode 100644 index 0000000..a53ac4d --- /dev/null +++ b/.github/workflows/doxygen_deploy.yml @@ -0,0 +1,17 @@ +name: Doxygen Deploy to GH Pages +on: + push: + branches: + - 'ros2' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: ./.github/workflows/doxygen_build.yml + - uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./html \ No newline at end of file From 967c31bfc6aef4e286bf6cabe9e0e8296c36b02a Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Wed, 17 Jan 2024 21:46:05 -0700 Subject: [PATCH 3/4] Add write perms to deploy * https://github.com/peaceiris/actions-gh-pages?tab=readme-ov-file#%EF%B8%8F-first-deployment-with-github_token Signed-off-by: Ryan Friedman --- .github/workflows/doxygen_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/doxygen_deploy.yml b/.github/workflows/doxygen_deploy.yml index a53ac4d..94d7ea5 100644 --- a/.github/workflows/doxygen_deploy.yml +++ b/.github/workflows/doxygen_deploy.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false + permissions: + contents: write steps: - uses: ./.github/workflows/doxygen_build.yml - uses: peaceiris/actions-gh-pages@v3 From 48230502073699c99645c9644b9b0320a438040f Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Wed, 17 Jan 2024 21:51:03 -0700 Subject: [PATCH 4/4] Upgrade checkout action to latest * And remove tokens since the repo is now public Signed-off-by: Ryan Friedman --- .github/workflows/build_test.yml | 5 +---- .github/workflows/check_style.yml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index f3671bf..477409f 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,10 +17,7 @@ jobs: - {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'} container: ${{ matrix.config.container }} steps: - - uses: actions/checkout@v1 - with: - token: ${{ secrets.ACCESS_TOKEN }} - github-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 - name: Install Dependencies working-directory: run: | diff --git a/.github/workflows/check_style.yml b/.github/workflows/check_style.yml index e267fe3..1a71114 100644 --- a/.github/workflows/check_style.yml +++ b/.github/workflows/check_style.yml @@ -18,7 +18,7 @@ jobs: - 'px4io/px4-dev-simulation-focal:2020-09-14' container: ${{ matrix.container }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: submodule update run: git submodule update --init --recursive - name: Install clang-format