Skip to content

Commit

Permalink
Move doc build steps to configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
figi44 committed Jan 19, 2024
1 parent 68a0e72 commit 48d8fd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 28 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,12 @@ name: Docs

on:
push:
branches:
- "feature/cd-docs"
tags:
- '**'

workflow_dispatch: ~

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@v2
secrets: inherit
14 changes: 14 additions & 0 deletions doc/doc-config.yml
Original file line number Diff line number Diff line change
@@ -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 -y -q 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:
space: docs
name: atlas

0 comments on commit 48d8fd3

Please sign in to comment.