本站主要用了两个GitHub Actions组件: peaceiris/actions-hugo easingthemes/ssh-deploy 下面是本站的.yml: name:MyBlogon:push:branches:-master# Set a branch to deployjobs:build_and_deploy:runs-on:ubuntu-18.04steps:-uses:actions/checkout@v2with:submodules:true# Fetch Hugo themes (true OR recursive...
GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended, Hugo Modules, Linux (Ubuntu), macOS, and Windows are supported. - GitHub - chenrui333/actions-hugo at node20
- name: use Node.js 10.x uses: actions/setup-node@v1 with: node-version: 10.x - name: npm i Hugo uses: peaceiris/actions-hugo@v2 - name: Build run: | hugo --minify #hugo --minify到ubuntu-latest是部署Hugo的,不用可以去掉 - name: setup aliyunossuses: manyuanrong/setup-ossutil@...
Github 默认的自动化部署步骤,是直接上传到了 Github Actions ,会生成一个网站查看,因我们是实现自己服务器的自动化部署,所以,将下面代码替换为以下代码 name:publish 9ongon:push:branches:-master # master分支提交的时候的触发github actionspaths-ignore:# 下列文件的变更不触发部署,可以自行添加-'archetypes/**'...
工作流的第一步是检出最新代码到 GitHub Actions 的虚拟环境中,通过 actions/checkout 实现。 uses: actions/checkout@v2 1. 安装Hugo uses:peaceiris/actions-hugo@v2 with: hugo-version:'0.55.5' extended:true 1. 2. 3. 4.
(true OR recursive)fetch-depth:0#Fetch all history for .GitInfo and .Lastmod-name:Setup Hugouses:peaceiris/actions-hugo@v3with:hugo-version:'0.119.0'#extended: true-name:Buildrun:hugo --minify-name:Deployuses:peaceiris/actions-gh-pages@v3if:github.ref == 'refs/heads/main'with:github_...
我的博客使用GitHub上的pages功能发布的基于Hugo生成的静态网站,基本无法正常访问,所以想要同步一份到gitee上发布,现在使用GitHub Actions提供的计算机资源就可以直接在GitHub上进行静态网站的生成,发布,远程刷新gitee pages,触发条件可以是push或者定时等等,可谓十分好用,之后看到可以直接同步到gitee仓库,就实现一下试试,以...
首先,参考Hugos 官方的 Github Pages 部署方式在代码库根目录创建.github/workflows/gh-pages.yml文件,内容如下: name:github pageson:push:branches:-main# Set a branch to deploypull_request:jobs:deploy:runs-on:ubuntu-20.04steps:-uses:actions/checkout@v2with:submodules:true# Fetch Hugo themes (true...
uses: peaceiris/actions-hugo@v2 with: hugo-version: latest extended: true - name: build content to public site working-directory: ./ run: hugo --minify --gc - name: install nodejs uses: actions/setup-node@v2 with: node-version: '14' ...
name:aliyunon:push:branches:-masterjobs:build:runs-on:ubuntu-lateststeps:-name:checkoutuses:actions/checkout@masterwith:submodules:true-name:Setup Hugouses:peaceiris/actions-hugo@v2.2.2with:hugo-version:'0.59.1'extended:true-name:Buildrun:hugo--minify-name:Deployenv:ACTIONS_DEPLOY_KEY:${{secre...