-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (98 loc) · 2.67 KB
/
build_all_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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build_All_And_Deploy
on:
push:
branches:
- GUI_deploy
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
steps:
#
- name: Checkout repository
uses: actions/checkout@v3
#
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.2
#
- name: Install python build dependencies
run: |
pip install --upgrade pip
pip install build
#
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.32
#
- name: Install apt-get dependencies for Ubuntu
run: |
sudo apt-get update
sudo apt-get install libsuitesparse-dev
#
- name: Build for Ubuntu
run: python -m build
#
- name: Build for Pyodide
run: |
pyodide build
cp ./dist/choreo-0.2.0-cp311-cp311-emscripten_3_1_32_wasm32.whl ./choreo_GUI/python_dist/choreo-0.2.0-cp311-cp311-emscripten_3_1_32_wasm32.whl
#
- name: Install locally with pip
run: pip install .[gui,cli,docs]
#
- name: Make Gallery Descriptor
run: |
cd choreo_GUI
python MakeGalleryDescriptor.py
cd ..
#
- name: Setup Pages
uses: actions/configure-pages@v1
#
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './choreo_GUI/'
#
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
#
- name: Generate Documentation
run: |
cd docs
make html
#
- name: Commit documentation changes
run: |
git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages
cp -r docs/build/html/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
#
- name: Push documentation changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.CHOREO_DOCS_TOKEN }}
repository: gabrielfougeron/choreo-docs
force: true