From 8e761e89d24ef0f6924e34d710ac6be0d58aff1f Mon Sep 17 00:00:00 2001 From: Rasha Atwi Date: Wed, 13 Sep 2023 15:06:28 -0400 Subject: [PATCH] Add build-deploy.yml --- .github/workflows/build-deploy.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build-deploy.yml diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml new file mode 100644 index 00000000..a2937028 --- /dev/null +++ b/.github/workflows/build-deploy.yml @@ -0,0 +1,41 @@ +name: Build and Deploy Website + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 # This action checks out your repository code + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + pip install -r docs/requirements.txt + + - name: Build HTML + run: | + cd docs + make html + + - name: Deploy to gh-pages + run: | + git config --global user.email "atwi.r@husky.neu.edu" + git config --global user.name "rashatwi" + git checkout --orphan gh-pages + git reset --hard + mv docs/build/* . + touch .nojekyll + git add . + git commit -m "Deploy website" + git branch -M gh-pages + git push -f origin gh-pages