From 45c05829332016fd969cc056bced34646aeffdc4 Mon Sep 17 00:00:00 2001 From: Michael Howard Date: Fri, 14 Feb 2025 15:40:46 -0600 Subject: [PATCH] Enable GitHub Actions --- .github/dependabot.yml | 6 ++++ .github/workflows/deploy.yml | 57 ++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..5ace4600a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..18a7eae02 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,57 @@ +name: deploy-book + +on: + push: + branches: + - main + +env: + BASE_URL: /${{ github.event.repository.name }} + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout book + uses: actions/checkout@v4 + + - name: Setup Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: 3.12 + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: Build book + run: | + jupyter-book build . + + - name: Upload book + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: "_build/html" + + deploy: + runs-on: ubuntu-latest + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy book to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4