diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..73a7182 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: ["main"] + workflow_dispatch: + +jobs: + # BUILD + build: + name: Build Site + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + - run: pip install sphinx sphinx_rtd_theme + - run: make html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'build/html' + + # DEPLOY + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + needs: [build] + permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action + environment: # Deploy to the github-pages environment + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} \ No newline at end of file