-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.65 KB
/
build_and_deploy.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
43
44
45
46
47
48
49
50
51
name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, '[build]') }}
steps:
- name: Checkout Documentation
uses: actions/checkout@v4
- name: Get latest Expyriment release
id: latest
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: expyriment
repo: expyriment
excludes: draft#, prerelease
- name: Checkout Expyriment
uses: actions/checkout@v4
with:
repository: expyriment/expyriment
path: expyriment
ref: ${{ steps.latest.outputs.release }}
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install -U pip wheel
- name: Build
run: |
make html EXPYRIMENT_PATH=./expyriment
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages-test # change back to gh-pages after testing
folder: _build/html/
target-folder: ./
clean: true
clean-exclude: |
old/
0.*/
- name: Get Expyriment version without v
run: |
VERSION=${{ steps.latest.outputs.release }}
echo "VERSION_NR=${VERSION:1}" >> $GITHUB_ENV
- name: Deploy (version subdirectory)
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages-test # change back to gh-pages after testing
folder: _build/html/
target-folder: ${{ env.VERSION_NR }}
clean: true