Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat: replace gitlab-ci by github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nainterceptor committed Sep 8, 2021
1 parent eae2242 commit b4a7365
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 45 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pages deployment

on:
push:

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.10'

- run: mdbook build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/github' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out/html
73 changes: 73 additions & 0 deletions .github/workflows/pandoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Pandoc

on: push

jobs:
pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create file list
id: files_list
run: |
mkdir output
echo "::set-output name=files::$(printf '"%s" ' src/??-*.md)"
- uses: docker://pandoc/latex:2.9
with:
args: >-
--resource-path src
--toc --toc-depth=2
--webtex
-f markdown --pdf-engine=xelatex --listings
--metadata-file=metadata.pandoc.yml
--output=output/result.pdf
${{ steps.files_list.outputs.files }}
- uses: actions/upload-artifact@master
with:
name: pdf
path: output
docx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create file list
id: files_list
run: |
mkdir output
echo "::set-output name=files::$(printf '"%s" ' src/??-*.md)"
- uses: docker://pandoc/core:2.9
with:
args: >-
--resource-path src
--toc --toc-depth=2
--webtex
--metadata-file=metadata.pandoc.yml
--output=output/result.docx
${{ steps.files_list.outputs.files }}
- uses: actions/upload-artifact@master
with:
name: docx
path: output
epub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create file list
id: files_list
run: |
mkdir output
echo "::set-output name=files::$(printf '"%s" ' src/??-*.md)"
- uses: docker://pandoc/core:2.9
with:
args: >-
--resource-path src
--toc --toc-depth=2
--webtex
--epub-cover-image=src/images/cover.png
--metadata-file=metadata.pandoc.yml
--output=output/result.epub
${{ steps.files_list.outputs.files }}
- uses: actions/upload-artifact@master
with:
name: epub
path: output
45 changes: 0 additions & 45 deletions .gitlab-ci.yml

This file was deleted.

0 comments on commit b4a7365

Please sign in to comment.