Skip to content

ci: Add deploy step for docs #190

ci: Add deploy step for docs

ci: Add deploy step for docs #190

Workflow file for this run

name: Build
on: [push]
permissions:
pages: write
contents: write
jobs:
package:
runs-on: ubuntu-latest
container:
image: wonderlandengine/editor:latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Package
run: |
npm ci
npm run build
npx typedoc --entryPoints ./src/index.ts --out docs --exclude "**/node_modules/**"
cd example
/usr/local/bin/entrypoint.sh WonderlandEditor --windowless --package --project ./SpatialAudioLab.wlp --credentials "$WLE_CREDENTIALS"
cd ..
env:
WLE_CREDENTIALS: ${{ secrets.WLE_CREDENTIALS }}
- name: Gzip-Project
run: gzip -k ./example/deploy/*.*
- name: Upload project artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./example/deploy
- name: Gzip-Docs
run: gzip -k ./docs/*.*
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs
deploy-pages:
permissions:
contents: read
pages: write
id-token: write
needs: package
runs-on: ubuntu-latest
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
steps:
- name: Deploy Project to GitHub Pages
uses: actions/deploy-pages@v2
- name: Deploy Docs to GitHub Pages
uses: actions/deploy-pages@v2