update zod #1241
This file contains hidden or 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 and Deploy Editor | |
| on: | |
| push: | |
| branches: | |
| - trunk | |
| tags: | |
| - "*" | |
| env: | |
| TARGET_CNAME: editor.dreamlab.gg | |
| TARGET_REPO: WorldQL/dreamlab-editor-deploy | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: dreamlab | |
| - name: Setup deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Build editor | |
| working-directory: ./dreamlab/editor | |
| run: deno task build | |
| env: | |
| IS_DEV: "true" | |
| - name: Pin engine revision | |
| continue-on-error: true | |
| working-directory: ./dreamlab | |
| run: deno run -A ./build-system/postprocess-html.ts ./editor/web/ | |
| - name: Upload build | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: editor | |
| path: ./dreamlab/editor/web | |
| retention-days: 14 | |
| - name: Checkout deployment repo | |
| uses: actions/checkout@v4 | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| repository: ${{ env.TARGET_REPO }} | |
| path: deploy | |
| token: ${{ secrets.REPO_PAT }} | |
| - name: Deploy | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| cd deploy | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git rm -r * | |
| git checkout HEAD -- .github || exit 0 | |
| cp -RL ../dreamlab/editor/web/. . | |
| echo "${{ env.TARGET_CNAME }}" > CNAME | |
| git add --all | |
| git commit -m "generated from ${{ github.repository }}@${{ github.sha }}" || exit 0 | |
| git push |