Skip to content

Fix GitHub Pages deployment workflow indentation error#4

Merged
BBC6BAE9 merged 2 commits intomainfrom
copilot/fix-github-pages-issue
Dec 24, 2025
Merged

Fix GitHub Pages deployment workflow indentation error#4
BBC6BAE9 merged 2 commits intomainfrom
copilot/fix-github-pages-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 24, 2025

GitHub Pages deployment was failing due to incorrect YAML structure in the workflow file.

Changes

  • Moved environment section from under steps to job level in .github/workflows/docc.yml

The environment key must be defined at the job level, not nested within steps:

deploy:
  runs-on: ubuntu-latest
  needs: build
  permissions:
    pages: write
    id-token: write
  environment:           # ← Correct: job-level
    name: github-pages
    url: ${{ steps.deployment.outputs.page_url }}
  steps:
    - name: Deploy to GitHub Pages
      id: deployment
      uses: actions/deploy-pages@v4
Original prompt

这个项目部署的GithubPages打不开了,曾经正常过,帮我修复


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@BBC6BAE9 BBC6BAE9 marked this pull request as ready for review December 24, 2025 08:23
Co-authored-by: BBC6BAE9 <20353278+BBC6BAE9@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GitHub Pages deployment issue Fix GitHub Pages deployment workflow indentation error Dec 24, 2025
Copilot AI requested a review from BBC6BAE9 December 24, 2025 08:26
@BBC6BAE9 BBC6BAE9 merged commit 1a7aaf7 into main Dec 24, 2025
@BBC6BAE9
Copy link
Copy Markdown
Owner

一个空白页面什么都没有

@BBC6BAE9 BBC6BAE9 deleted the copilot/fix-github-pages-issue branch December 24, 2025 08:30
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.

2 participants