From 517025a1b761112cabb8ea02f8b0a9febdbfee65 Mon Sep 17 00:00:00 2001 From: Dusan Figala Date: Fri, 19 Jan 2024 08:58:27 +0100 Subject: [PATCH] Move doc build steps to configuration file --- .github/workflows/docs.yml | 28 ++-------------------------- doc/doc-config.yml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 26 deletions(-) create mode 100644 doc/doc-config.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cede55a53..a545b1207 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,29 +11,5 @@ on: jobs: publish: - runs-on: ubuntu-latest - steps: - - name: checkout atlas-docs - uses: actions/checkout@v4 - with: - repository: ecmwf/atlas-docs - - - name: checkout atlas source - uses: actions/checkout@v4 - with: - path: atlas-source - ref: master - - - name: install doxygen and latex - run: sudo apt install doxygen texlive-full - - - name: build docs - run: make PUBLIC=1 WITH_ECKIT=1 WITH_DOXYGEN=1 ATLAS_SOURCE_DIR=atlas-source clean html - - - name: publish - uses: ecmwf-actions/reusable-workflows/ecmwf-sites-upload@v2 - with: - token: ${{ secrets.ECMWF_SITES_TOKEN }} - path: build/html - space: docs - name: atlas + uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-docs.yml@docs-cd + secrets: inherit \ No newline at end of file diff --git a/doc/doc-config.yml b/doc/doc-config.yml new file mode 100644 index 000000000..08335ec90 --- /dev/null +++ b/doc/doc-config.yml @@ -0,0 +1,14 @@ +# note: each step is executed in own process +build-steps: + - git clone --depth 1 https://github.com/ecmwf/atlas-docs.git $RUNNER_TEMP/atlas-docs + - sudo apt install doxygen texlive-full + - | + cd $RUNNER_TEMP/atlas-docs + make PUBLIC=1 WITH_ECKIT=1 WITH_DOXYGEN=1 ATLAS_SOURCE_DIR=$GITHUB_WORKSPACE clean html + echo "DOC_BUILD_PATH=$RUNNER_TEMP/atlas-docs/build/html" >> "$GITHUB_ENV" + +hosts: + ecmwf-sites: + site: docs + name: atlas +