ci: Deploy Docs to different url #194
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 | |
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: | |
name: deploy | |
path: ./example/deploy | |
- name: Gzip-Docs | |
run: gzip -k ./docs/*.* | |
- name: Upload docs artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
name: docs | |
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 |