-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
I have noticed that a deployment failed triggered on my fork repo.
The deployment should only triggered on this repo but not on other forked repos for safety concerns.
You can have: deploy.yml modified to:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
env:
CPPDOC_SITE: https://cppdoc.cc
steps:
- name: Checkout source code
uses: actions/checkout@v6
- name: Build and upload artifacts
uses: withastro/action@v5
deploy:
needs: build
runs-on: ubuntu-latest
# disable the fork repo deployment.
if: github.repository == 'cppdoc-cc/cppdoc'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4Metadata
Metadata
Assignees
Labels
No labels