Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ZMAlt committed Sep 19, 2024
1 parent 70bca24 commit 6ad6c06
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 70 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ name: CI
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:

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

- uses: julia-actions/setup-julia@v1
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@v1

- 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 BookTemplate; BookTemplate.build()'

- name: Deploy to gh-pages branch
if: ${{ github.event_name != 'pull_request' }}
Expand Down
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"
33 changes: 0 additions & 33 deletions metadata.yml

This file was deleted.

38 changes: 15 additions & 23 deletions src/CSL_Chinese.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,22 @@ module CSL_Chinese

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
using Reexport: @reexport
@reexport using Books:
build_all,
gen

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

end # module

0 comments on commit 6ad6c06

Please sign in to comment.