我尝试设置一个 GitHub Actions 工作流程,在推送到存储库时将 .org 文件导出为 pdf 和 .tex。我按照本页中的示例进行操作,但无法使工作流程正常工作。
这里我提供目前为止我一直在使用的脚本:
name: Export file.org
on: [push]
jobs:
Export-org:
runs-on: ubuntu-latest
steps:
- name: Org Knit
uses: tecosaur/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force_orphan: true
export: tex, pdf, md
files: "path_to/file.org"
keep_files: true
这是我得到的输出:
由于某种原因,该操作未检测到存储库中的 .org 文件。
在运行
tecosaur/org-knit-action
工作流程之前,您可能会错过结帐操作。签出操作会签出您当前的分支,以便运行者可以访问您分支中的文件。
在您提供的链接内,它提到您需要结帐操作作为序言。您的工作流程应如下所示:
name: Export file.org
on: [push]
jobs:
Export-org:
runs-on: ubuntu-latest
# Checkout your branch to get the files
- name: Checkout
uses: actions/checkout@v2
- name: Org Knit
uses: tecosaur/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force_orphan: true
export: tex, pdf, md
files: "path_to/file.org"
keep_files: true