#Deploy to the github-pages environmentenvironment:name:github-pagesurl:${{ steps.deployment.outputs.page_url }}#Specify runner + deployment stepruns-on:ubuntu-lateststeps: -name:Deploy to GitHub Pagesid:deploymentuses:actions/deploy-pages@v4#or specific "vX.X.X" version tag for this action...
# 部署到GitHub Pages-也就是将打包内容发布到GitHub Pages-name: Deploy # 使用别人写好的 actions去部署(将打包文件部署到指定分支上) uses: JamesIves/github-pages-deploy-action@v4.3.3# 自定义环境变量with: # 指定仓库:你要发布的仓库路径名 repository-name: msyuan/vitePress-project # 部署到 deploy-...
GitHub Pages Deploy Action 🚀 Automatically deploy your project to GitHub Pages with GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like, including gh-pages and docs. It can also handle cross repository deployments and works with GitHub...
填好以后我们点击create fork,下一步点击settings,找到左侧的Pages,把来源改成Github action。 然后我们在顶部找到actions,点击这个绿色按钮启动action功能。 启动好以后,左边有一些列出的工作流,我们使用第二个deploy on Github Pages。右侧有一个按钮run workflow,这里点击run workflow。我们刷新一下页面,这里工作流就开...
第一步是获取源码,使用的 action 是actions/checkout。 第二步是构建和部署,使用的 action 是JamesIves/github-pages-deploy-action。 第二步需要四个环境变量,分别为 GitHub 密钥、发布分支、构建成果所在目录、构建脚本。其中,只有 GitHub 密钥是秘密变量,需要写在双括号里面,其他三个都可以直接写在文件里。
Github: Github Action插件查询库,可以查询你需要的action库,这些都是共享的,如果满足不了需求也可以自己定义。 这里使用了一个别人已经写好的 Action : JamesIves/github-pages-deploy-action , Github Action 市场的地址为:https://github.com/marketplace/actions/deploy-to-github-pages。
首先进入要配置Github Action的repository,然后在Settings页面进行如下配置: 设置一个变量名,并将前边生成的token粘贴在下方Secret处,点击Add secret 配置Github Actions Actions # Sample workflow for building and deploying a Hugo site to GitHub Pagesname:Deploy Hugo site to Pageson:# Runs on pushes targeting...
-name:Deploy🚀 uses:JamesIves/github-pages-deploy-action@v4 with: folder:dist# The folder the action should deploy. 上面的脚本参考自:Deploy to GitHub Pages · Actions · GitHub Marketplace 这些配置也很容易理解,这里有一点要说明,GitHub Actions支持直接复用别人写的脚本,上面的actions/checkout@v4和...
jobs.<job_id>.steps.run:该步骤运行的命令或者 action。 jobs.<job_id>.steps.env:该步骤所需的环境变量。 下面是一个完整的 workflow 文件的范例。 name:Greeting from Mona on:push jobs:my-job:name:My Job runs-on:ubuntu-latest steps:-name:Print a greeting ...
This PR switches from a manual deploy script to an automatic GitHub Action that deploys to Pages, including build & pnpm caching. You also no longer have to change the basePath in next.config.ts - this is handled automatically. I also updated dependencies. Closes #1 n1ckoates added 5 comm...