Build and Deploy on: push: branches: - main jobs: deploy: concurrency: ci-${{ github.ref }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ uses: actions/checkout@v4 - name: Install and Build 🔧 # This
source#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 是 actions/checkout 然后是构建和部署,使用的 action 是 JamesIves/github-pages-deploy-action 然后是配置环境变量,这里的 ACCESS_TOKEN 就是我们刚才申请的 Token ,因为我的命名是 ACCESS_TOKEN ,所以这里这么写,如果有其他命名请自行更换, BRANCH 是配置部署的分支,我这里是部署到了...
也就是説實現了在線寫靜態博客的需求。 準備 工作流程設計到兩個倉庫和一個cos桶,例如: Lruihao/hugo-blog # Blog source repository Lruihao/lruihao.github.io # Github pages repository blog-1256932288 # COS bucket Github Actions 創建workflows 任務 創建hugo-site/.github/workflows/deploy.yml, 這個文件會...
Deploy to GitHub Pages: 提供 部署能力 Optional 参数说明 2.4 完整的配置 .github/workflows/actions.yml name: Actions CI - Next.js version 12 static site export, GitHub Actions Build and Deploy on: push: branches: [ main ] # 执行的一项或多项任务 jobs: build-and-deploy: # 运行在虚拟机环境...
name: First GitHub Actions Demo on: # 推送到master分支开始打包 push: branches: - master jobs: # 开始打包 Build: runs-on: ubuntu-latest steps: - name: checkout code # 迁出触发的流程的版本 能让下面的工作流程访问 uses: actions/checkout@v2 ...
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和JamesIves/github-...
GitHub Actions 是 GitHub 的持续集成服务,是一个非常强大的功能,用它可以实现很多自动化功能。现在我们来使用Github Actions将我们做好的Vue项目部署到Github Pages上。 本项目源码:Tuzilow/github-actions-demo Github Actions是什么? 持续集成通常由很多操作组成,比如运行单元测试、登录远程服务器、打包代码等等,Github...
https://github.com/marketplace/actions/deploy-to-github-pages https://cli.vuejs.org/zh/guide/deployment.html#github-pages 目录 第一步:配置workflows 第二步:开启GitHub Pages 使用GitHub Pages部署一个在线Demo,每次更新代码都要手动打包,切换分支,然后上传到github,感觉太麻烦了,这下有了Actions就可以实现...
https:///marketplace/actions/deploy-to-github-pages https://cli.vuejs.org/zh/guide/deployment.html#github-pages 目录 第一步:配置workflows 第二步:开启GitHub Pages 使用GitHub Pages部署一个在线Demo,每次更新代码都要手动打包,切换分支,然后...