Skip to content

Integrate stk as a structure provider, and generate shapes for custom bonds #1559

Integrate stk as a structure provider, and generate shapes for custom bonds

Integrate stk as a structure provider, and generate shapes for custom bonds #1559

Workflow file for this run

name: Build website
on:
push:
branches: [main]
tags: ['v*']
pull_request:
# Check all PR
jobs:
build-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# we need the full history to be able to get the chemiscope version with
# git describe during the build
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: configure access to git repositories in package-lock.json
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]
- name: install npm dependencies
run: npm ci
- name: install python dependencies
run: |
python3 -m pip install tox==4.14.0
- run: npm run build
- run: npm run download-examples
- run: tox -e docs
- run: tox -e generate-standalone
- name: assemble full website
run: |
cp -r app/ gh-pages/
cp dist/*.min.js gh-pages/
cp chemiscope_standalone.html gh-pages/
cp -r docs/build/html/ gh-pages/docs/
rm -f gh-pages/examples/.gitignore
- name: deploy website to gh-pages
# only deploy website from main branch
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages/
cname: chemiscope.org
force_orphan: true
- name: upload minified JS to GitHub release
# only upload minified JS from tags
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
dist/chemiscope.d.ts
dist/chemiscope.min.js
dist/molecule-viewer.min.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}