Skip to content

Commit

Permalink
consolidated actions workflows into one single.
Browse files Browse the repository at this point in the history
  • Loading branch information
joecrowleygaia committed Aug 19, 2024
1 parent d744403 commit 9c330ce
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 52 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
name: ci
name: CI
on:
release:
types:
- published
- deleted
push:
branches:
- main
- BDRSPS-721
permissions:
contents: write
jobs:
deploy:
publish_documentation:
env:
DOCS_BRANCH: docs-site
runs-on: ubuntu-latest
steps:
- name: Checkout docs-site
- name: Checkout ${{ env.DOCS_BRANCH }}
uses: actions/checkout@v4
with:
ref: docs-site
ref: ${{ env.DOCS_BRANCH }}
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
Expand All @@ -21,7 +28,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install Project and Generate Markdown
- name: Install project and generate markdown
run: |
pipx install poetry==1.6.1
poetry install
Expand All @@ -33,6 +40,16 @@ jobs:
path: .cache
restore-keys: |
mkdocs-material-
- name: Build Site
- name: Build and deploy documentation
run: |
poetry run mike deploy dev --push --branch=docs-site
if [ "${{ github.event_name }}" == "push" ]; then
echo "Updating 'dev' documentation"
poetry run mike deploy --push --branch=${{ env.DOCS_BRANCH }} dev
elif [ "${{ github.event.action }}" == "published" ]; then
echo "Creating documentation version ${{ github.ref_name }}"
poetry run mike deploy --push --branch=${{ env.DOCS_BRANCH }} --update-aliases ${{ github.ref_name }} latest
poetry run mike set-default --push --branch=${{ env.DOCS_BRANCH }} latest
elif [ "${{ github.event.action }}" == "deleted" ]; then
echo "Deleting documentation version ${{ github.ref_name }}"
poetry run mike delete --push --branch=${{ env.DOCS_BRANCH }} ${{ github.ref_name }}
fi
45 changes: 0 additions & 45 deletions .github/workflows/releases.yml

This file was deleted.

0 comments on commit 9c330ce

Please sign in to comment.