From 84ff947e331b5024ed5ea549d36e8e1aa6172445 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Tue, 13 Jun 2023 15:37:09 -0400 Subject: [PATCH 1/3] Initial commit --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..02580951a6 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Github Actions to automate the building of the pages. From f7d7a342257167fe3cea2af156306f3e6ef710f1 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Tue, 13 Jun 2023 15:43:14 -0400 Subject: [PATCH 2/3] Add initial action deploy Doxygen from SimpleITK release --- .github/workflows/doxygen.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/doxygen.yml diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml new file mode 100644 index 0000000000..f35af97638 --- /dev/null +++ b/.github/workflows/doxygen.yml @@ -0,0 +1,47 @@ +name: Doxygen Update from SimpleITK/SimpleITK latest + +on: + push: { branches: [ gh-actions ] } + schedule: + # Every Sunday at 9:11am UTC or 5:11am EST + - cron: '11 9 * * 0' + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + ref: master + - name: Download Doxygen from SimpleITK lastest release + run: | + gh release download latest -R SimpleITK/SimpleITK -p SimpleITKDoxygen\*.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Update GitHub Pages + run: | + [ ! -z "${doxygen_path}" ] || exit -1 + git rm -rf ${doxygen_path} + mkdir -p ${doxygen_path} + gzip -dc SimpleITKDoxygen-*.tar.gz | tar -zxvf - -C ${doxygen_path} + + git config --global user.email "simpleitk_github_io@itk.org" + git config --global user.name "GitHub Actions bot for SimpleITK.github.io" + + if ( git diff --quiet ${doxygen_path} ); then + echo "No changes to commit" + exit 0 + fi + + git add ${doxygen_path} + git commit -m "Update Doxygen to ${TAG}" + + git push origin ${TARGET_BRANCH} + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TARGET_BRANCH: 'master' + doxygen_path: "doxygen/latest" From d7ae270d81acb2f5fabd38d93abc26e764c71776 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Tue, 20 Jun 2023 15:30:20 -0400 Subject: [PATCH 3/3] Hacking --- .github/workflows/doxygen.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index f35af97638..6c12ac0e26 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -3,8 +3,8 @@ name: Doxygen Update from SimpleITK/SimpleITK latest on: push: { branches: [ gh-actions ] } schedule: - # Every Sunday at 9:11am UTC or 5:11am EST - - cron: '11 9 * * 0' + # Every day at 9:11 AM UTC or 5:11 AM EST + - cron: '11 9 * * *' workflow_dispatch: jobs: @@ -26,17 +26,25 @@ jobs: [ ! -z "${doxygen_path}" ] || exit -1 git rm -rf ${doxygen_path} mkdir -p ${doxygen_path} - gzip -dc SimpleITKDoxygen-*.tar.gz | tar -zxvf - -C ${doxygen_path} + tar -zxvf SimpleITKDoxygen-*.tar.gz -C ${doxygen_path} + git config --global user.email "simpleitk_github_io@itk.org" git config --global user.name "GitHub Actions bot for SimpleITK.github.io" - if ( git diff --quiet ${doxygen_path} ); then + echo "-----" + cat doxygen/latest/html/build_text.js + echo "-----" + git diff --quiet ${doxygen_path} + + + + git add ${doxygen_path} + if ( git diff --cached --quiet ${doxygen_path} ); then echo "No changes to commit" exit 0 fi - git add ${doxygen_path} git commit -m "Update Doxygen to ${TAG}" git push origin ${TARGET_BRANCH}