Skip to content

Commit

Permalink
Initial publish workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
schuler-henry committed Jan 30, 2023
1 parent e21bf52 commit 8526ff6
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/new_release.yml
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: |
*.pdf
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 }}

0 comments on commit 8526ff6

Please sign in to comment.