Skip to content

Commit 7e71872

Browse files
committed
💚 CI: Fix streamlit example publication github action
1 parent 2761b2f commit 7e71872

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Rename entry point of report to index.html
4040
run: |
4141
mv docs/quarto_report/quarto_report.html docs/quarto_report/index.html
42-
- name: Publish html report to github pages
42+
- name: Publish HTML report to GitHub Pages (gh-pages branch)
4343
# Only publish a new static report upon a new release -> can be changed.
4444
if: startsWith(github.ref, 'refs/tags')
4545
uses: peaceiris/actions-gh-pages@v4
@@ -53,22 +53,9 @@ jobs:
5353
# path: docs/_build/
5454

5555
# --- Streamlit example deployment ---
56-
- name: Configure Git for Streamlit example branch
57-
run: |
58-
git config --global user.name "github-actions[bot]"
59-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
60-
- name: Create or reset Streamlit example branch
61-
run: |
62-
git fetch origin
63-
git checkout -B streamlit-example
64-
- name: Remove all existing files except .git
65-
run: |
66-
find . -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} +
67-
- name: Copy necessary Streamlit files
68-
run: |
69-
git checkout main -- docs/streamlit_report docs/example_data/Earth_microbiome_vuegen_demo_notebook requirements.txt
70-
- name: Commit and push to streamlit-example branch
71-
run: |
72-
git add .
73-
git commit -m "Update Streamlit example deployment files"
74-
git push --force origin streamlit-example
56+
- name: Publish Streamlit report to streamlit-example branch
57+
uses: peaceiris/actions-gh-pages@v4
58+
with:
59+
github_token: ${{ secrets.GITHUB_TOKEN }}
60+
publish_dir: docs/
61+
publish_branch: streamlit-example

0 commit comments

Comments
 (0)