-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e21bf52
commit 8526ff6
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# create a release and deploy the pdf to GitHub Pages | ||
|
||
name: New Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@v3 | ||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
root_file: "*.tex" | ||
glob_root_file: true | ||
- name: Upload PDF file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: PDF | ||
path: "*.pdf" | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
|
||
steps: | ||
- name: Download build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: PDF | ||
|
||
- name: Create release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: | | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
|
||
steps: | ||
- name: Create build destination | ||
run: | | ||
mkdir public | ||
- name: Download build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: PDF | ||
path: public | ||
|
||
- name: View downloaded artifacts | ||
run: ls -R | ||
working-directory: public | ||
|
||
- name: Deploy to GitHub Pages | ||
if: success() | ||
uses: crazy-max/ghaction-github-pages@v3 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: public | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |