Skip to content

Commit

Permalink
divide dev also in doxygen and quartodoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ygeunkim committed Feb 8, 2025
1 parent a69986e commit 0cbd7a1
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/doxygen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ jobs:
- name: Create .nojekyll
run: sudo touch inst/doxygen/html/.nojekyll

- name: Set target folder
run: |
BRANCH=${GITHUB_REF##*/}
if [ "$BRANCH" == "develop" ]; then
echo "TARGET_FOLDER=package/bvhar/dev/cpp" >> $GITHUB_ENV
else
echo "TARGET_FOLDER=package/bvhar/cpp" >> $GITHUB_ENV
fi
shell: bash

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
Expand All @@ -44,4 +54,5 @@ jobs:
clean: false
branch: master
folder: inst/doxygen/html
target-folder: package/bvhar/cpp
# target-folder: package/bvhar/cpp
target-folder: ${{ env.TARGET_FOLDER }}
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
run: |
BRANCH=${GITHUB_REF##*/}
if [ "$BRANCH" == "develop" ]; then
sed -i 's|VERSION_TEXT|CRAN version|; s|VERSION_REF|https://ygeunkim.github.io/package/bvhar/|' _pkgdown.yml
sed -i 's|VERSION_TEXT|CRAN version|; s|VERSION_REF|https://ygeunkim.github.io/package/bvhar/|; s|PY_REF|https://ygeunkim.github.io/package/bvhar/dev/python/|; s|CPP_REF|https://ygeunkim.github.io/package/bvhar/dev/cpp/|' _pkgdown.yml
else
sed -i 's|VERSION_TEXT|Development version|; s|VERSION_REF|https://ygeunkim.github.io/package/bvhar/dev/|' _pkgdown.yml
sed -i 's|VERSION_TEXT|Development version|; s|VERSION_REF|https://ygeunkim.github.io/package/bvhar/dev/|; s|PY_REF|https://ygeunkim.github.io/package/bvhar/python/|; s|CPP_REF|https://ygeunkim.github.io/package/bvhar/cpp/|' _pkgdown.yml
fi
shell: bash

Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/quartodoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ jobs:
conda run -n bvhar-dev quartodoc build
conda run -n bvhar-dev quarto render .
working-directory: python/docs

- name: Main and develop
run: |
BRANCH=${GITHUB_REF##*/}
if [ "$BRANCH" == "develop" ]; then
echo "TARGET_FOLDER=package/bvhar/dev/python" >> $GITHUB_ENV
sed -i 's|VERSION_REF|https://github.com/ygeunkim/bvhar/tree/develop/python|; s|R_VERSION_REF|https://ygeunkim.github.io/package/bvhar/|' _variables.yml
else
echo "TARGET_FOLDER=package/bvhar/python" >> $GITHUB_ENV
sed -i 's|VERSION_REF|https://github.com/ygeunkim/bvhar/tree/master/python|; s|R_VERSION_REF|https://ygeunkim.github.io/package/bvhar/dev/|' _variables.yml
fi
working-directory: python/docs

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
Expand All @@ -57,4 +69,4 @@ jobs:
clean: false
branch: master
folder: python/docs/_site
target-folder: package/bvhar/python
target-folder: ${{ env.TARGET_FOLDER }}
4 changes: 2 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ home:
- text: VERSION_TEXT
href: VERSION_REF
- text: C++ headers
href: https://ygeunkim.github.io/package/bvhar/cpp/
href: CPP_REF
- text: bvhar for Python
href: https://ygeunkim.github.io/package/bvhar/python/
href: PY_REF

development:
mode: auto
Expand Down
4 changes: 2 additions & 2 deletions python/docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ website:
- text: "bvhar"
file: intro.qmd
- text: "bvhar in R"
href: https://ygeunkim.github.io/package/bvhar/
href: {{< var rref >}}
target: _blank
right:
- icon: github
href: https://github.com/ygeunkim/bvhar/tree/develop/python
href: {{< var pyref >}}
aria-label: bvhar-python github
sidebar:
style: floating
Expand Down
4 changes: 3 additions & 1 deletion python/docs/_variables.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
version: QUARTODOC_VERSION
version: QUARTODOC_VERSION
pyref: VERSION_REF
rref: R_VERSION_REF

0 comments on commit 0cbd7a1

Please sign in to comment.