fix(editor): align canvas preview and export (#381) #49
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: Deploy documentation site | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - release/1.x | |
| paths: | |
| - 'src/index.ts' | |
| - 'src/marker.ts' | |
| - 'src/marker.web.ts' | |
| - 'src/web/**' | |
| - 'packages/editor/src/**' | |
| - 'packages/editor/package.json' | |
| - 'packages/editor/README.md' | |
| - 'website/**' | |
| - 'README.MD' | |
| - 'package.json' | |
| - '.github/workflows/docs-site.yml' | |
| - 'website/versions.json' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout v2 documentation | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: master | |
| path: current | |
| - name: Checkout v1 LTS | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: release/1.x | |
| path: v1 | |
| - name: Checkout immutable v1.0.0 source | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: v1.0.0 | |
| path: archive | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '22.22.0' | |
| cache: npm | |
| cache-dependency-path: | | |
| current/package-lock.json | |
| current/website/package-lock.json | |
| v1/package-lock.json | |
| v1/website/package-lock.json | |
| - name: Install v2 documentation dependencies | |
| run: | | |
| npm ci --prefix current | |
| npm ci --prefix current/website | |
| - name: Install v1 documentation dependencies | |
| run: | | |
| npm ci --prefix v1 | |
| npm ci --prefix v1/website | |
| - name: Build v2 documentation | |
| run: | | |
| if [ "$(node -p "require('./current/website/versions.json').releaseStage")" = "ga" ]; then | |
| docs_channel=current | |
| else | |
| docs_channel=preview | |
| fi | |
| DOCS_CHANNEL="$docs_channel" DOCS_GIT_REF=master \ | |
| npm --prefix current run docs | |
| - name: Build v1 LTS | |
| env: | |
| DOCS_CHANNEL: v1 | |
| DOCS_GIT_REF: release/1.x | |
| run: npm --prefix v1 run docs | |
| - name: Assemble versioned documentation | |
| run: | | |
| node current/website/scripts/assemble-versioned-site.mjs \ | |
| --v1-dir v1/website/dist \ | |
| --next-dir current/website/dist \ | |
| --archive-root archive \ | |
| --out-dir current/website/versioned-dist \ | |
| --v1-sha "$(git -C v1 rev-parse HEAD)" \ | |
| --next-sha "$(git -C current rev-parse HEAD)" \ | |
| --archive-sha "$(git -C archive rev-parse HEAD)" | |
| node current/website/scripts/check-versioned-site.mjs \ | |
| --dir current/website/versioned-dist | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: current/website/versioned-dist | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: https://image-marker.corerobin.com | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |