Skip to content

Commit

Permalink
test (#1)
Browse files Browse the repository at this point in the history
make CI works
  • Loading branch information
ZMAlt authored Sep 20, 2024
1 parent 70bca24 commit 656f733
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 66 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,34 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:

jobs:
BuildAndDeploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: "1.6"
version: "1"

# 这里是用来安装 Books 必备的字体的,不能删除
- name: Install dependencies
run: julia --color=yes --project -e 'using Pkg; Pkg.instantiate();
using Books; Books.install_dependencies()'
- uses: julia-actions/cache@v2

- run: julia --project -e 'using CSL_Chinese; using Books; mkpath("_build"); gen();'
- run: julia --color=yes --project -e 'using Pkg; Pkg.instantiate()'

- run: julia --project -e 'using CSL_Chinese; CSL_Chinese.build()'

- name: Deploy to gh-pages branch
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
cname: zmalt.github.io/CSL_Chinese
github_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
publish_dir: ./_build/
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "CSL_Chinese"
uuid = "2c2349b6-e3e1-473f-81d9-e9a98781fcdf"
authors = ["maozhou <[email protected]>"]
authors = ["maozhou <[email protected]>"]
version = "0.1.0"

[deps]
Expand Down
12 changes: 6 additions & 6 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

[projects.default]
contents = [
"index",
"CSL_introduce",
"XML_basis",
"CSL_1.0.1_spec",
"locale_file"
"locale_file",
]
# Port used by serve()
port = 8006

# Extra directories to be copied.
extra_directories = [
"images"
]
extra_directories = []

online_url = "https://zmalt.github/io/csl"
online_url = "https://zmalt.github.io/CSL_Chinese"

output_filename = "CSL Chinese"
output_filename = "CSL_Chinese"
1 change: 0 additions & 1 deletion contents/CSL_introduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@

要明白 CSL 是怎么运作的,首先要了解 CSL 的生态。`Style`指的是 CSL 样式,`Item Metadata`指的是每篇参考文献的作者,题目等信息,`Locale Files`是为实现与语言无关(指英语,汉语等)的格式的本地化文件,`Citation Details`指的是影响引文信息或参考文献列表表现的细节,比如顺序,位置等。

![](<https://docs.citationstyles.org/en/stable/_images/csl-infrastructure.png>)

### 独立格式和从属格式

Expand Down
26 changes: 2 additions & 24 deletions metadata.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
---
title: CSL Chinese
title: CSL_Chinese
subtitle: ""
author:
- Mao Zhou

html-license: ''
pdf-footer: ""
tex-license: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
lang: en-US
tags: [Julialang, CSL, Chinese]
repo: https://test
repo:
secPrefix: Section
figPrefix: Figure
tblPrefix: Table
titlepage: true
bibliography: pandoc/references.bib
allow-subsubsections: true

# Only used in PDF.
titlepage-top: >
\begin{tabular}{l}
Mao Zhou\\
Wu Han University\\
China\\
\end{tabular}
titlepage-bottom: |
First edition published 2021
\url{https://juliadatascience.io}
---
38 changes: 15 additions & 23 deletions src/CSL_Chinese.jl
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
module CSL_Chinese

using Books
using Reexport: @reexport

@reexport begin
using Books:
BUILD_DIR,
@sc,
@sco,
Options,
build_all,
catch_show,
clean_stacktrace,
code_block,
convert_output,
gen,
output_block,
sc,
sco,
scob,
serve,
without_caption_label

end

# Showcode additions.
export sce, scsob, trim_last_n_lines, plainblock
@reexport using Books:
build_all, html, pdf,
gen

"""
build()
This function is called during CI.
"""
function build()
# To avoid publishing broken websites.
fail_on_error = true
gen(; fail_on_error)
html()
#build_all(; fail_on_error)
end

end # module

0 comments on commit 656f733

Please sign in to comment.