From 0658f40bf88672981358c5cdd586c2936aa929d7 Mon Sep 17 00:00:00 2001 From: Ryan Daniels <31715811+rkdan@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:28:26 +0100 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..6fc49704c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,36 @@ +name: Deploy MkDocs to Documentation Repo + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install MkDocs and dependencies + run: | + pip install mkdocs mkdocs-material mkdocstrings + + - name: Build the MkDocs site + run: mkdocs build + + - name: Deploy to Documentation Repo + run: | + git config --global user.name 'github-actions' + git config --global user.email 'actions@github.com' + git clone --branch gh-pages https://github.com/acceleratescience/documentation.git + rsync -av --delete ./site/ documentation/packaging-publishing/ + cd documentation + git add . + git commit -m "Deploy packaging-publishing to /packaging-publishing" + git push