feat(preview): Modify the style to be consistent with toolbar save. (… #52
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [develop] | |
| jobs: | |
| deploy-gh-pages: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: deploy-gh-pages | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: add environment variable | |
| run: | | |
| cat <<'EOF' >> designer-demo/env/.env.alpha | |
| // ---- appended by CI (gh-pages) ---- | |
| VITE_ORIGIN=https://agent.opentiny.design/ | |
| EOF | |
| - name: change material url | |
| run: | | |
| sed -i "s#material: \['/mock/bundle.json'\]#material: \['https://opentiny.github.io/tiny-engine/mock/bundle.json'\]#g" designer-demo/engine.config.js | |
| echo "Updated material url in designer-demo/engine.config.js" | |
| - name: Run Build | |
| run: | | |
| set -eo pipefail | |
| pnpm run build:plugin 2>&1 | tee /tmp/build-plugin.log | |
| pnpm run build:alpha 2>&1 | tee /tmp/build-alpha.log | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./designer-demo/dist/ | |
| keep_files: true | |
| force_orphan: false | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' |