Skip to content

Commit 86cefc7

Browse files
committed
add pipeline
1 parent 6fd42ab commit 86cefc7

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/dev.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build LaTeX document
2+
on:
3+
push:
4+
branches-ignore: [ main ]
5+
6+
jobs:
7+
Build-LaTeX-Doc:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Git Repository
11+
uses: actions/checkout@v2
12+
13+
- name: Compile LaTeX Doc
14+
id: compile-doc
15+
uses: xu-cheng/latex-action@v2
16+
with:
17+
root_file: main.tex

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build LaTeX document and deploy new Release
2+
on:
3+
push:
4+
branches: [ main ]
5+
6+
jobs:
7+
Build-LaTeX-Doc-and-Deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Git Repository
11+
uses: actions/checkout@v2
12+
13+
- name: Compile LaTeX Doc
14+
id: compile-doc
15+
uses: xu-cheng/latex-action@v2
16+
with:
17+
root_file: main.tex
18+
19+
- name: Create new Release
20+
id: create_release
21+
uses: actions/create-release@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
tag_name: v1.${{ github.run_number }}
26+
release_name: ${{ github.repository }}
27+
draft: false
28+
prerelease: false
29+
30+
- name: Upload Release Asset
31+
id: upload-release-asset
32+
uses: actions/upload-release-asset@v1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
37+
asset_path: ./main.pdf
38+
asset_name: main.pdf
39+
asset_content_type: application/zip

0 commit comments

Comments
 (0)