From 9ac7b4011f1e0660f483306f599f6395631b0336 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Fri, 20 Jun 2025 14:46:10 -0700 Subject: [PATCH] **ci(workflows): update permissions and token usage for deploy workflow** ### Changes: - **deploy-demo.yml**: - Added `contents: write` permissions to ensure the workflow can access repository content during operations. - Used `${{ secrets.GITHUB_TOKEN }}` for authentication in the deployment step. - **package.json**: - Removed the `deploy:demo` script and its `gh-pages` dependency to clean up unused scripts and dependencies. ### Purpose: Enhanced the deploy workflow by explicitly defining required permissions and securely managing authentication. Simplified the configuration by removing outdated scripts and dependencies. --- .github/workflows/deploy-demo.yml | 3 +++ package.json | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 3ddee411..25b4889e 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -8,6 +8,8 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout 🛎️ uses: actions/checkout@v3 @@ -31,3 +33,4 @@ jobs: with: folder: examples branch: gh-pages + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index c785b278..c7925b00 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "version:minor": "npm version minor", "version:major": "npm version major", "deploy": "npm run build && npm publish", - "deploy:demo": "npm run build && npm run build:browser && gh-pages -d examples", "deploy:cloud:aws": "cd cloud-wrapper && npm run build && npm run deploy:aws", "deploy:cloud:gcp": "cd cloud-wrapper && npm run build && npm run deploy:gcp", "deploy:cloud:cloudflare": "cd cloud-wrapper && npm run build && npm run deploy:cloudflare", @@ -85,7 +84,6 @@ "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.45.0", - "gh-pages": "^6.3.0", "jest": "^29.6.2", "rollup": "^4.12.0", "rollup-plugin-terser": "^7.0.2",