**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.
This commit is contained in:
David Snelling 2025-06-20 14:46:10 -07:00
parent f46dd21dc8
commit 9ac7b4011f
2 changed files with 3 additions and 2 deletions

View file

@ -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 }}

View file

@ -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",