idem #280
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Setup Emscripten | |
uses: mymindstorm/setup-emsdk@v11 | |
with: | |
version: 3.1.32 | |
# | |
- name: Build for Ubuntu | |
run: | | |
pip install .[gui,cli,docs] | |
python -m build | |
pip install -e . | |
# | |
- 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: 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 | |