name:githubpageson:push:branches:-master# default branchjobs:deploy:runs-on:ubuntu-18.04steps:-uses:actions/checkout@v2-run:npminstall-run:npmrundocs:build-name:Deployuses:peaceiris/actions-gh-pages@v3with:github_token:${{secrets.GITHUB_TOKEN}}publish_dir:./docs-dist 多人协作开发,云端代码检测...
这里使用 Actions 市场中的 GitHub Pages v3 (https://github.com/marketplace/actions/github-pages-v3?fileGuid=1PWJAvQBtLA5IGh3) 插件 name: github pages on: push: branches: - master # default branch jobs: deploy: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - run: npm inst...
在这个仓库的.github/workflows目录,生成一个 workflow 文件,名字可以随便取,这个示例是ci.yml # ci.ymlname:Vue3 Vite Vant H5 Templateon:push:branches:-mainjobs:build-and-deploy:concurrency:ci-${{ github.ref }}runs-on:ubuntu-lateststeps:-name:Checkout ️ # 将代码拉取到虚拟机uses:actions/chec...
on:[push]jobs:hello_world_job:runs-on:ubuntu-latestname:A job to say hellosteps:-name:Hello world action stepid:hellouses:actions/hello-world-docker-action@v2with:who-to-greet:'Mona the Octocat'# Use the output from the `hello` step-name:Get the output timerun:echo "The time was ${...
jobs: my_first_job: steps: - name: My first step # Uses the default branch of a public repository uses: actions/heroku@main - name: My second step # Uses a specific version tag of a public repository uses: actions/aws@v2.0.1 示例:在子目录中使用公共操作 {owner}/{repo}/{path}@{...
jobs:my_first_job:steps:-name:My first step# Uses the default branch of a public repositoryuses:actions/heroku@main-name:My second step# Uses a specific version tag of a public repositoryuses:actions/aws@v2.0.1 上传 构建产物 - uses: actions/upload-artifact@v3 ...
编写Actions配置文件 # This is a basic workflow to help you get started with Actionsname:Refresh# Controls when the action will run. Triggers the workflow on push or pull request# events but only for the master branchon:push:schedule:-cron:'00 * * * *'# A workflow run is made up of...
git push -u origin master 配置GitHub Actions 回到GitHub,点击Setting->Pages,看到如下界面 image image 并没有展示网址,别急!此时还需要我们去新建一个名为gh-pages的分支,创建完成后再次打开Pages,可以看到页面发生了变化 image Source: 选择Deploy from a branch,Branch:github pages默认只能识别项目根目录的inde...
编写Actions配置文件 # This is a basic workflow to help you get started with Actionsname:Refresh# Controls when the action will run. Triggers the workflow on push or pull request# events but only for the master branchon:push:schedule:-cron:'00 * * * *'# A workflow run is made up of...
Github Actions 支持 jobs..if (opens new window)语法 Github Actions运行中我们可以拿到一些当前的环境信息,比如git的提交内容信息,通过这些内容来控制actions的执行 比如,当git message不包含wip才触发构建 代码语言:javascript 复制 jobs:format:runs-on:ubuntu-latestif:"! contains(github.event.head_commit.messag...