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
name: Render and upload docs | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
name: Render PDF and upload | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Compile PDF document from rmd | |
uses: ./ | |
with: | |
input_file: test/pdf.Rmd | |
output_format: pdf_document | |
- name: Commit files | |
run: | | |
git config --local core.autocrlf false | |
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | |
git config --local user.name "${{ github.actor }}" | |
git add . && git add --renormalize . | |
git pull origin ${{ github.head_ref }} --autostash --rebase -X ours | |
git commit --allow-empty -am "AUTO-GH ACTION: ${{ github.workflow }}" | |
NO_PAGER=1 git --no-pager diff HEAD^ | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.head_ref }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} |