首页文章正文

git pages dist,git repository

Git Bash 2023-12-19 23:32 178 墨鱼
Git Bash

git pages dist,git repository

git pages dist,git repository

$gitadd-fdist$gitcommit-m'createproject'$gitsubtreepush--prefixdistoriginh-pagesYoucanseeanewbranchgh-pagesofthisprojectonyourgithub,insetpaths://Path-dist//theartifact指向的目录,这里指的是整个目录cache://cachepaths://Path-node_modules///Cachenode_mudules将极大地提高cirunningpages的速度:// 任何名称阶段:d

现在,dist文件夹将由Git纳入版本控制,您可以将其直接部署到GitHubPages。 摘要本文介绍了两种方法来解决将忽略的dist文件夹部署到GitHubPages的问题。 第一种方法是进行gitpush--force"https://{{github.token}}@github/{{github.repository}}"master:gh-pagesYAMLCopy将替换为您的相对路径到thedist文件夹。 观点

-mkdirpublic&&cp-rfdist/*public#创建一个public目录,并将构建结果dist下的文件复制到publicartifacts:#定义artifact。作业执行后,gitlab-pages会切换artifact目录1.切换分支,先提交主分支的代码,提交后执行gitswitchgh-pages。执行后,文件目录如下图所示,还有ist文件夹打包在主分支中,但是这个文件夹有问题(里面的内容是

-distpages:#任务名称必须是pages,这是gitlabstage的内部任务:deployapproval:falsescript:-rm-rfpublic/*-mvdist/*publicartifacts:paths:gitsubtreepush--prefixdistorigingh-pages1您可以在仓库中看到您登录到远程GitHub仓库并通过setting->githubpages->source将gh-pages设置为GitHubpages的源。它在这里

demo/.gitignore0→100644Viewfile@846078e2.DS_Storenode_modules//dist/npm-debug.log*yarn-debug.log*yarn-error.log*/test/unit/coverage/#Editordirectoriesandfgitsubtreepush--prefix=distorigingh-pages意味着将指定的dist文件提交到gh-pages分支 此时,我们看到多了一个algh-pages分支,所以显示地址就是Github用户名.g

后台-插件-广告管理-内容页尾部广告(手机)

标签: git repository

发表评论

评论列表

快喵加速器 Copyright @ 2011-2022 All Rights Reserved. 版权所有 备案号:京ICP1234567-2号