Changed classes to inherete from compas.Data #510
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: deploy-and-publish | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: build and deploy docs | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: 🔗 Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel | |
python -m pip install cython --config-settings="--build-option=--no-cython-compile" | |
- name: 💎 Install | |
run: | | |
python -m pip install --no-cache-dir -r requirements-dev.txt | |
- uses: NuGet/[email protected] | |
- name: Install dependencies | |
run: | | |
choco install ironpython --version=2.7.8.1 | |
- uses: compas-dev/compas-actions.ghpython_components@v2 | |
with: | |
source: src/compas_fab/ghpython/components | |
target: src/compas_fab/ghpython/components/ghuser | |
- name: 📃 Generate docs | |
if: success() | |
run: | | |
invoke docs --check-links | |
# Get branch/tag/latest name from git | |
GITHUB_REF_REGEX="tags/v([0-9a-zA-Z\.\-]+)|(pull/[0-9]+)|heads/(.+)" | |
if [[ $GITHUB_REF =~ $GITHUB_REF_REGEX ]]; then | |
if [[ $BASH_REMATCH = pull* ]]; then | |
BRANCH_OR_TAG=pull_${BASH_REMATCH##*/} | |
elif [[ $BASH_REMATCH = tags/v* ]]; then | |
# 2nd element is tag, #v replaces prefix v | |
BRANCH_OR_TAG=${BASH_REMATCH[1]#v} | |
else | |
BRANCH_OR_TAG=${BASH_REMATCH##*/} | |
fi; | |
if [[ $BRANCH_OR_TAG = main ]]; then | |
BRANCH_OR_TAG=latest | |
fi; | |
fi; | |
echo "Docs will be deployed to https://gramaziokohler.github.io/compas_fab/$BRANCH_OR_TAG" | |
mkdir -p deploy/compas_fab/$BRANCH_OR_TAG && mv -T dist/docs deploy/compas_fab/$BRANCH_OR_TAG/ | |
mv docs/doc_versions.txt deploy/compas_fab/doc_versions.txt | |
shell: bash | |
- name: 🚢 Deploy docs | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
repo: gramaziokohler/gramaziokohler.github.io | |
target_branch: main | |
build_dir: deploy | |
keep_history: true | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
- name: 💃 Build release | |
if: success() && startsWith(github.ref, 'refs/tags') | |
run: | | |
python setup.py clean --all sdist bdist_wheel | |
- name: 📦 Publish release to PyPI | |
if: success() && startsWith(github.ref, 'refs/tags') | |
run: | | |
twine check dist/* | |
twine upload dist/* --skip-existing | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.pypi_password }} | |