通过github动作使用液体模板语言来建立失败的高架部署
当尝试通过GitHub页面部署高度博客时,自动添加了单独的工作流,名为build and build and exployment
。
但是,由于我的博客使用液体模板语言和语法冲突,因此与jekyll 过程步骤一起构建构建。例如,root Directory中的文件
about.html
使用_includes \ about.liquid
和构建过程发出以下错误:
Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: "author.liquid" Valid syntax: {% include file.ext param='value' param2='value' %} in src/about.html
build.yml 文件:
name: Build Eleventy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies & build
run: |
npm ci
npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./_site
github_token: ${{ secrets.GITHUB_TOKEN }}
此工作流程获得干净的通行证,但其另一个自动添加了引起麻烦的自动。
我遵循的资源使用github操作部署了11个站点,避免了页面构建和部署
自动工作流,因为所有这些都已发布在 github 添加了新的工作流程。
我的问题是,我错过了什么吗?也许有任何新的插件可以使Jekyll兼容可以部署?我可以禁用工作流程,从而遵循传统代码进行部署吗?
When trying to deploy an Eleventy blog via github pages, a seperate workflow is auto added named pages build and deployment
.
However the issue arises with the build with jekyll
process step, as my blog uses liquid templating language and syntaxes conflict. For example, a file about.html
in the root directory uses _includes\about.liquid
and the build process issues the following error:
Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: "author.liquid" Valid syntax: {% include file.ext param='value' param2='value' %} in src/about.html
The build.yml
file:
name: Build Eleventy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies & build
run: |
npm ci
npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./_site
github_token: ${{ secrets.GITHUB_TOKEN }}
This workflow gets a clean pass but its the other auto added one that's causing trouble.
The resources I've followed to deploy 11ty sites using Github Actions avoids the pages build and deployment
auto workflow since all of them are posted before the new workflow was added by github.
My question is, am I missing anything? Any new plugins perhaps for Jekyll compatibility to deploy perhaps? Can I disable the workflow and thus follow the legacy codes to deploy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您不使用jekyll来构建网站,因此可以通过添加一个空的
.nojekyll
file to to repository 。在您的情况下,此文件将在
main
分支上,并应防止GitHub尝试使用Jekyll构建。Since you're not using Jekyll to build your site, you can disable building with Jekyll by adding an empty
.nojekyll
file to the root of your repository.In your case, this file would be on the
main
branch and should prevent GitHub from trying to build with Jekyll.