Skip to content

Conversation

@ishita1805
Copy link
Contributor

No description provided.

Comment on lines 11 to 44
runs-on: ubuntu-latest
name: Deploy Web Examples
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Install Dependencies
run: pnpm install --frozen-lockfile
working-directory: ./

- name: Build
run: pnpm run build
working-directory: ./

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: '4.42.1'
command: pages deploy ./dist --project-name=demo-app
workingDirectory: ./demo-app

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI about 13 hours ago

To fix the problem, we should add an explicit permissions block to the workflow file. The best way is to add it at the workflow root (just below the name: key) so that it applies to all jobs in the workflow unless specifically overridden in a job. For this deployment workflow, setting contents: read is generally sufficient, as the workflow steps only check out the code and deploy it externally; they do not write to the repository, create issues, etc. The change must be made to .github/workflows/deploy.yml on a line after name: Deploy Web Examples and before on:.


Suggested changeset 1
.github/workflows/deploy.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -1,4 +1,6 @@
 name: Deploy Web Examples
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Deploy Web Examples
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 4, 2025

Deploying react-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: 41990fd
Status: ✅  Deploy successful!
Preview URL: https://7581fd44.react-examples.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 4, 2025

Deploying angular-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: 41990fd
Status: ✅  Deploy successful!
Preview URL: https://74d55ea8.angular-examples-a7h.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 4, 2025

Deploying html-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: 41990fd
Status: ✅  Deploy successful!
Preview URL: https://942dd7e0.html-examples-c69.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 4, 2025

Deploying examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: a35f7ae
Status: ✅  Deploy successful!
Preview URL: https://0afd0468.examples-120.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
examples 4ef5669 Nov 05 2025, 07:46 AM

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
angular-examples 4ef5669 Nov 05 2025, 07:46 AM

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 5, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
react-examples e7c97e7 Nov 05 2025, 11:32 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant