Skip to content

Commit 70ca52a

Browse files
committed
fix: publish pdf when tag
1 parent 0a1ca5f commit 70ca52a

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

.github/workflows/deploy-to-gh-pages.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Deploy to GitHub Pages
22
on:
33
push:
4+
branches:
5+
- master
6+
tags:
7+
- 'v*'
48

59
jobs:
610
build-and-deploy:
@@ -27,11 +31,3 @@ jobs:
2731
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2832
BRANCH: gh-pages
2933
FOLDER: build/html
30-
- name: build pdf
31-
run: |
32-
make latexpdf
33-
- uses: actions/upload-artifact@v2
34-
if: ${{ always() }}
35-
with:
36-
name: pdf
37-
path: build/latex/reinforcement-learning-an-introduction-chinese.pdf

.github/workflows/release-pdf.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy to GitHub Pages
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
container:
11+
image: qiwihui/docker-sphinx-cjk-pdf
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
- name: Install dependencies
16+
run: |
17+
pip3 install -U -r requirements.txt
18+
- name: build pdf
19+
run: |
20+
make latexpdf
21+
- name: upload pdf asset
22+
uses: softprops/action-gh-release@v1
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
draft: false
27+
prerelease: false
28+
files: ./build/latex/reinforcement-learning-an-introduction-chinese.pdf

0 commit comments

Comments
 (0)