From 7b951ce11b894fe2e11f1f9a6cd4e7e426df7325 Mon Sep 17 00:00:00 2001 From: Jermiah Joseph Date: Fri, 30 Aug 2024 12:22:19 -0400 Subject: [PATCH] chore: Update .gitignore to include Python bytecode and cache files; add CI-CD workflow for MkDocs documentation build and deploy --- .github/workflows/main.yaml | 49 +++++++++++++++++++++++++++++++++++++ .gitignore | 10 ++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..05e6c1f9 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,49 @@ +name: CI-CD + +# run on any push to any directory and a pull to main or development +on: + push: + branches: + - '*' + pull_request: + branches: + - main + - development + +jobs: + ################################################################################################ + # Docs: Build and deploy mkdocs documentation + ################################################################################################ + Docs: + runs-on: ubuntu-latest + + permissions: + # Need to give the action permission to write to the repository to deploy the docs + contents: write + + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - name: Check-out repository + uses: actions/checkout@v4 + + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email github-actions[bot]@users.noreply.github.com + + - name: Install Pixi + uses: prefix-dev/setup-pixi@v0.8.0 + with: + pixi-version: v0.23.0 + cache: true + locked: false + + - name: Build documentation + run: pixi run build + + - name: Build and deploy documentation + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + run: pixi run deploy \ No newline at end of file diff --git a/.gitignore b/.gitignore index 096b5eb5..fa8a6d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,13 @@ # pixi environments .pixi *.egg-info + +site + +.DS_Store +*.pyc +*.pyo + +__pycache__ + +**/__pycache__/* \ No newline at end of file