Skip to content

Update jupyter-book-publish.yml (#69) #24

Update jupyter-book-publish.yml (#69)

Update jupyter-book-publish.yml (#69) #24

name: Publish Jupyter Book
on:
push:
branches:
- main # Set this to your default branch
jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
contents: write
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # It's important to disable the automatic token
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jupyter-book ghp-import
pip install .
- name: Configure git authentication
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "turulomio@yahoo.es"
git config --global user.name "turulomio"
# This line is crucial for your issue
git config --global http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n x-access-token:${GITHUB_TOKEN} | base64)"
- name: Build Jupyter Book
run: |
jupyter-book build jupyter/
- name: Upload artifact to pass to GitHub Pages
run: |
ghp-import -n -p -f jupyter/_build/html