Skip to content

Merge branch 'main' of https://github.com/IFCjs/web-ifc #235

Merge branch 'main' of https://github.com/IFCjs/web-ifc

Merge branch 'main' of https://github.com/IFCjs/web-ifc #235

Workflow file for this run

name: Publish to Github Pages
env:
NPM_TOKEN: ' '
on:
push:
branches: [ main ]
permissions:
contents: write
pages: write
id-token: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.44
- name: Checkout 🛎️
uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 18
- name: Install and Build
run: |
npm install -g npm@latest
npm ci
npm --prefix ./examples/viewer ci
npm run build-release
- name: Archive Build
uses: montudor/action-zip@v1
with:
args: zip -qq -r build.zip dist/
- name: Build Viewer
run: |
npm run build-viewer
npm run gen-docs
mkdir ./dist/pages
mkdir ./dist/pages/demo
mkdir ./dist/pages/examples
mkdir ./dist/pages/docs
cp -R ./examples/viewer/dist/* ./dist/pages/demo
cp -R ./dist/docs/* ./dist/pages/docs
cp -R ./build.zip ./dist/pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './dist/pages'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1