This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
introduced a state concept for asset loader and migrated gltfloader t⦠#19821
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: documentation | |
on: | |
pull_request: | |
branches: [dev] | |
push: | |
branches: [dev] | |
jobs: | |
secrets-gate: | |
runs-on: ubuntu-latest | |
outputs: | |
ok: ${{ steps.check-secrets.outputs.ok }} | |
steps: | |
- name: check for secrets needed to run workflows | |
id: check-secrets | |
run: | | |
if [ ${{ secrets.DOCUMENTATION_BUILD_ENABLED }} == 'true' ]; then | |
echo "ok=enabled" >> $GITHUB_OUTPUT | |
fi | |
checks: | |
if: github.event_name != 'push' | |
runs-on: ubuntu-latest | |
env: | |
NODE_OPTIONS: --max_old_space_size=8192 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Config npm registry token | |
run: npm config set '//npm.pkg.github.com/:_authToken' "${NPM_TOKEN}" | |
env: | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: install main repository | |
run: npm install --legacy-peer-deps | |
- name: clone etherealengine docs | |
run: git clone https://github.com/etherealengine/etherealengine-docs.git docs | |
- name: install docs npm packages | |
working-directory: docs | |
run: npm install --legacy-peer-deps | |
- name: build docs | |
working-directory: docs | |
run: | | |
cp .env.local.default .env.local | |
npm run build | |
gh-release: | |
needs: | |
- secrets-gate | |
if: ${{ needs.secrets-gate.outputs.ok == 'enabled' && github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- uses: webfactory/ssh-agent@v0.7.0 | |
with: | |
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} | |
- name: Config github npm registry token | |
run: npm config set '//npm.pkg.github.com/:_authToken' "${NPM_TOKEN}" | |
env: | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release to GitHub Pages | |
timeout-minutes: 200 | |
env: | |
NODE_OPTIONS: --max_old_space_size=16384 | |
USE_SSH: true | |
GIT_USER: git | |
DEPLOYMENT_BRANCH: gh-pages | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "gh-actions" | |
npm install --legacy-peer-deps | |
git clone https://github.com/etherealengine/etherealengine-docs.git docs | |
echo "Starting to remove commit history for gh-pages branch" | |
cd docs | |
git checkout gh-pages | |
git checkout --orphan temp-gh-pages | |
git add -A | |
git commit -m "Update docs to latest commit only" | |
git checkout gh-pages | |
git reset --hard temp-gh-pages | |
git push origin gh-pages --force | |
git branch -D temp-gh-pages | |
echo "gh-pages commit history has been cleared" | |
cp .env.local.default .env.local | |
npm install --legacy-peer-deps | |
npm run deploy |