Skip to content

Commit

Permalink
[CI/CD] pages
Browse files Browse the repository at this point in the history
  • Loading branch information
floatshadow committed Feb 27, 2024
1 parent d8de5c5 commit 0f4cc6c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Deploy on GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-heti-plugin
- run: mkdocs gh-deploy --force
19 changes: 19 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# The Docker image that will be used to build your app
image: python:3.8-bullseye
cache: # Pip's cache doesn't store the python packages
paths: # https://pip.pypa.io/en/stable/topics/caching/
- .cache/pip
# Functions that should be executed before the build script is run
before_script:
- pip install mkdocs-material mkdocs-heti-plugin
pages:
script:
- mkdocs build --verbose --strict
artifacts:
paths:
# The folder that contains the files to be exposed at the Page URL
- public
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
17 changes: 13 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
site_name: 浙江大学编译原理课程实验
#site_url: https://floatshadow.github.io/compiler24/
site_url: https://floatshadow.github.io/accipit/
repo_url: https://github.com/floatshaodw/accipit
repo_name: floatshadow/accipit
theme:
Expand All @@ -20,22 +20,31 @@ theme:
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/toggle-switch-off-outline
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/toggle-switch
icon: material/brightness-4
name: Switch to light mode
nav:
- Accipit IR 规范: accipit-spec.md
- SysY 语言规范: sysy-spec.md


plugins:
- search
- heti:
extra_skipped_class:
- arithmatex

extra_javascript:
- https://cdn.tonycrane.cc/utils/katex.min.js
- javascripts/katex.js

extra_css:
- https://cdn.tonycrane.cc/utils/katex.min.css
- https://fonts.googleapis.com/css?family=Roboto:500,500i,600,600i&display=fallback

markdown_extensions:
- toc:
permalink: true
Expand Down

0 comments on commit 0f4cc6c

Please sign in to comment.