-
Notifications
You must be signed in to change notification settings - Fork 19
41 lines (41 loc) · 1.31 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: compilepaper
on: [push]
jobs:
paper:
runs-on: ubuntu-latest
env:
DIR: .
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install pandoc
run: sudo apt-get update && sudo apt-get install -y texlive pandoc texlive-bibtex-extra texlive-xetex biber latexmk
- name: pandoc compile
working-directory: ${{ env.DIR }}
run: make
- name: move
run: mkdir -p github_artifacts && mv ${{ env.DIR }}/output.pdf ./github_artifacts/
- name: Upload pdf as artifact
uses: actions/upload-artifact@v2
with:
name: output.pdf
path: ./github_artifacts
deploy:
needs: [paper]
runs-on: ubuntu-latest
if: ${{ github.repository == 'CaptainSifff/paper_teaching-learning-RSE' && github.ref == 'refs/heads/main' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
path: github_artifacts
- name: move
run: mkdir -p github_deploy && mv github_artifacts/*/* github_deploy
- name: deploy on orphan branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./github_deploy
publish_branch: build
force_orphan: true