Skip to content

Commit 3e2cd42

Browse files
authored
Merge pull request #18 from kp992/fix_ci
update CI
2 parents 4364029 + c7f8ca3 commit 3e2cd42

File tree

1 file changed

+10
-38
lines changed

1 file changed

+10
-38
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,18 @@ name: Build and Deploy
33
on:
44
push:
55
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- '*'
6+
- main
7+
paths:
8+
- book/**
9+
- requirements.txt
10+
- .github/workflows/deploy.yml
11+
workflow_dispatch:
1012

1113
jobs:
12-
build:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
- name: Setup Python
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: '3.10'
21-
- name: Install the dependencies
22-
run: |
23-
python -m pip install -r requirements.txt
24-
- name: Build the JupyterLite site
25-
run: |
26-
cp README.md content
27-
jupyter lite build --contents content --output-dir dist
28-
- name: Upload artifact
29-
uses: actions/upload-pages-artifact@v1
30-
with:
31-
path: ./dist
32-
33-
deploy:
34-
needs: build
35-
if: github.ref == 'refs/heads/main'
14+
call-workflow:
15+
uses: TeachBooks/deploy-book-workflow/.github/workflows/deploy-book.yml@main
16+
secrets: inherit
3617
permissions:
18+
contents: read
3719
pages: write
3820
id-token: write
39-
40-
environment:
41-
name: github-pages
42-
url: ${{ steps.deployment.outputs.page_url }}
43-
44-
runs-on: ubuntu-latest
45-
steps:
46-
- name: Deploy to GitHub Pages
47-
id: deployment
48-
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)