File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ # create a release and deploy the pdf to GitHub Pages
2+
3+ name : New Release
4+
5+ on :
6+ push :
7+ tags :
8+ - v*.*.*
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Set up Git repository
15+ uses : actions/checkout@v3
16+ - name : Compile LaTeX document
17+ uses : xu-cheng/latex-action@v2
18+ with :
19+ root_file : " *.tex"
20+ glob_root_file : true
21+ - name : Upload PDF file
22+ uses : actions/upload-artifact@v3
23+ with :
24+ name : PDF
25+ path : " *.pdf"
26+
27+ release :
28+ runs-on : ubuntu-latest
29+ needs : [build]
30+
31+ steps :
32+ - name : Download build
33+ uses : actions/download-artifact@v3
34+ with :
35+ name : PDF
36+
37+ - name : Create release
38+ uses : " marvinpinto/action-automatic-releases@latest"
39+ with :
40+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
41+ prerelease : false
42+ files : |
43+ *.pdf
44+
45+ publish :
46+ runs-on : ubuntu-latest
47+ needs : [build]
48+
49+ steps :
50+ - name : Create build destination
51+ run : |
52+ mkdir public
53+
54+ - name : Download build
55+ uses : actions/download-artifact@v3
56+ with :
57+ name : PDF
58+ path : public
59+
60+ - name : View downloaded artifacts
61+ run : ls -R
62+ working-directory : public
63+
64+ - name : Deploy to GitHub Pages
65+ if : success()
66+ uses : crazy-max/ghaction-github-pages@v3
67+ with :
68+ target_branch : gh-pages
69+ build_dir : public
70+ env :
71+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments