Skip to content

Commit

Permalink
Add build-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rashatwi committed Sep 13, 2023
1 parent d933920 commit 8e761e8
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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

0 comments on commit 8e761e8

Please sign in to comment.