Skip to content

Test with glob

Test with glob #9

Workflow file for this run

# create a release and deploy the pdf to GitHub Pages
name: New Release
on:
push:
tags:
- v*.*.*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Check files
run: "pwd && ls && ls latex/"
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: "*.tex"
working_directory: latex/
work_in_root_file_dir: true
glob_root_file: true
- name: Check files
run: "ls && ls latex/"
- name: Upload PDF file
uses: actions/upload-artifact@v3
with:
name: PDF
path: "./latex/*.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
cat > public/index.html <<EOL
<!doctype html>
<html>
<head>
<title>GitHub Pages deployed!</title>
</head>
<body>
<div style="position: absolute; left: 0; right: 0; bottom: 0; top: 0;">
<iframe src="./main.pdf" width="100%" height="100%" frameborder="0">
</iframe>
</div>
</body>
</html>
EOL
- 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 }}