fix(core): skip buffer debug copies outside debug mode (#2838) (#2850) #179
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: website | |
| on: | |
| push: | |
| branches: | |
| - '*-release' | |
| workflow_dispatch: | |
| concurrency: website-gh-pages | |
| jobs: | |
| check_branch: | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| should_deploy: ${{ steps.deploy_config.outputs.should_deploy }} | |
| target_folder: ${{ steps.deploy_config.outputs.target_folder }} | |
| website_base_url: ${{ steps.deploy_config.outputs.website_base_url }} | |
| steps: | |
| - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| packageFile=$(if [ -d modules ]; then ls modules/core/package.json | head -n 1; else echo package.json; fi) | |
| packageName=$(jq -r '.name' $packageFile) | |
| LATEST=$(npm show "${packageName}@latest" version | grep -o -E "^[0-9]+\.[0-9]+") | |
| echo "latest=${LATEST}-release" >> "$GITHUB_OUTPUT" | |
| - name: Resolve deploy config | |
| id: deploy_config | |
| env: | |
| LATEST_RELEASE_BRANCH: ${{ steps.get_version.outputs.latest }} | |
| run: | | |
| if [ "${GITHUB_REF_NAME}" = "master" ]; then | |
| echo "should_deploy=true" >> "$GITHUB_OUTPUT" | |
| echo "target_folder=next" >> "$GITHUB_OUTPUT" | |
| echo "website_base_url=/next/" >> "$GITHUB_OUTPUT" | |
| elif [ "${GITHUB_REF_NAME}" = "${LATEST_RELEASE_BRANCH}" ]; then | |
| echo "should_deploy=true" >> "$GITHUB_OUTPUT" | |
| echo "target_folder=" >> "$GITHUB_OUTPUT" | |
| echo "website_base_url=/" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "should_deploy=false" >> "$GITHUB_OUTPUT" | |
| echo "target_folder=" >> "$GITHUB_OUTPUT" | |
| echo "website_base_url=/" >> "$GITHUB_OUTPUT" | |
| fi | |
| deploy: | |
| runs-on: ubuntu-22.04 | |
| needs: check_branch | |
| permissions: | |
| contents: write | |
| if: ${{ github.repository_owner == 'visgl' && needs.check_branch.outputs.should_deploy }} | |
| steps: | |
| - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
| with: | |
| token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }} | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Enable Corepack / Yarn 4 | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@4.13.0 --activate | |
| yarn -v | |
| - name: Setup Node (with Corepack) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' # or 'pnpm', 'npm' depending on your package manager | |
| cache-dependency-path: yarn.lock | |
| - name: Install dependencies and build website | |
| env: | |
| WEBSITE_BASE_URL: ${{ needs.check_branch.outputs.website_base_url }} | |
| run: | | |
| yarn install --immutable | |
| yarn website:build | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # 4.8.0 | |
| with: | |
| token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }} | |
| branch: gh-pages | |
| folder: website/build | |
| target-folder: ${{ needs.check_branch.outputs.target_folder }} | |
| clean: true | |
| clean-exclude: | | |
| next |