-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.31 KB
/
jupyter-book-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
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 pydicts
- 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