Skip to content

Commit 67401e5

Browse files
committed
Add trigger and test actions
1 parent 9923f25 commit 67401e5

File tree

2 files changed

+42
-40
lines changed

2 files changed

+42
-40
lines changed

.github/workflows/deploy.yml

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,24 @@
1-
name: Build and Deploy
1+
name: Trigger site rebuild
22

33
on:
44
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
5+
branches: [main]
6+
tags:
97
- '*'
108

9+
1110
jobs:
12-
build:
13-
runs-on: ubuntu-latest
11+
trigger-site-rebuild:
12+
name: Docs
13+
runs-on: ubuntu-24.04
14+
defaults:
15+
run:
16+
shell: bash -l {0}
1417
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v4
17-
- name: Setup Python
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version: '3.11'
21-
- name: Install the dependencies
22-
run: |
23-
python -m pip install -r requirements.txt
24-
- name: Build the JupyterLite site
18+
- name: Trigger docs site rebuild
19+
if: github.ref == 'refs/heads/main'
2520
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@v3
30-
with:
31-
path: ./dist
32-
33-
deploy:
34-
needs: build
35-
if: github.ref == 'refs/heads/main'
36-
permissions:
37-
pages: write
38-
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@v4
21+
curl -X POST https://api.github.com/repos/tskit-dev/tskit-site/dispatches \
22+
-H 'Accept: application/vnd.github.everest-preview+json' \
23+
-u AdminBot-tskit:${{ secrets.ADMINBOT_TOKEN }} \
24+
--data '{"event_type":"build-docs"}'

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- '*'
9+
10+
jobs:
11+
test-build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
- name: Install the dependencies
21+
run: |
22+
python -m pip install -r requirements.txt
23+
- name: Build the JupyterLite site
24+
run: |
25+
cp README.md content
26+
jupyter lite build --contents content --output-dir dist

0 commit comments

Comments
 (0)