You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

pkgdown站点GitHub Pages部署失败求助

pkgdown部署GitHub Pages时清理环节失败问题

我在将pkgdown站点发布到GitHub Pages时遇到问题,为此生成了示例包。创建包时执行的命令如下:

devtools::create_package("~/Documents/testpackage")
usethis::use_git()
usethis::use_github()
usethis::use_pkgdown_github_pages()

之后我添加了一个返回字符串的函数、roxygen注释骨架及testthat测试脚本,推送代码时曾提示PAT权限不足,完成授权后推送成功,但构建pkgdown站点的GitHub Action始终在部署后清理环节失败,错误信息如下:

Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/72uicfmll
Reset branch 'github-pages-deploy-action/72uicfmll'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 ❌
Notice: Deployment failed! ❌

多次重新运行Action均未解决问题,以下是我的sessionInfo()输出:

R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.6.2

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] usethis_2.1.6

loaded via a namespace (and not attached):
 [1] pillar_1.8.1      compiler_4.1.2    sys_3.4           tools_4.1.2      
 [5] digest_0.6.30     testthat_3.1.4    evaluate_0.15     jsonlite_1.8.0   
 [9] memoise_2.0.1     lifecycle_1.0.3   tibble_3.1.8      pkgconfig_2.0.3  
[13] rlang_1.0.6       cli_3.4.1         rstudioapi_0.14   curl_4.3.2       
[17] yaml_2.3.5        xfun_0.31         pkgdown_2.0.6     fastmap_1.1.0    
[21] knitr_1.39        withr_2.5.0       httr_1.4.3        desc_1.4.1       
[25] fs_1.5.2          vctrs_0.5.0       gitcreds_0.1.1    askpass_1.1      
[29] rprojroot_2.0.3   gert_1.6.0        glue_1.6.2        R6_2.5.1         
[33] processx_3.7.0    gh_1.3.0          fansi_1.0.3       rmarkdown_2.14   
[37] callr_3.7.1       purrr_0.3.4       magrittr_2.0.3    whisker_0.4      
[41] ps_1.7.1          htmltools_0.5.3   credentials_1.3.2 utf8_1.2.2       
[45] openssl_2.0.2     cachem_1.0.6      crayon_1.5.1      brio_1.1.3  

内容的提问来源于stack exchange,提问作者Hugh Warden

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 17:12:48