-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions
committed
Nov 1, 2024
1 parent
3df5bda
commit 91bb53f
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,50 @@ jobs: | |
repository: blacklanternsecurity/bbot | ||
outputs: | ||
BBOT_VERSION: ${{ steps.version.outputs.BBOT_VERSION }} | ||
publish_docs: | ||
needs: update_docs | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/dev') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.BBOT_DOCS_UPDATER_PAT }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v3 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry install --only=docs | ||
- name: Configure Git | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git fetch origin gh-pages:refs/remotes/origin/gh-pages | ||
if git show-ref --verify --quiet refs/heads/gh-pages; then | ||
git branch -f gh-pages origin/gh-pages | ||
else | ||
git branch --track gh-pages origin/gh-pages | ||
fi | ||
- name: Generate docs (stable branch) | ||
if: github.ref == 'refs/heads/stable' | ||
run: | | ||
poetry run mike deploy Stable | ||
- name: Generate docs (dev branch) | ||
if: github.ref == 'refs/heads/dev' | ||
run: | | ||
poetry run mike deploy Dev | ||
- name: Publish docs | ||
run: | | ||
git switch gh-pages | ||
git push | ||
# tag_commit: | ||
# needs: publish_code | ||
# runs-on: ubuntu-latest | ||
|