Update main.yml #2
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 documents and upload | |
'on': | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
render_document: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v2 | |
- name: Render HTML | |
uses: lc5415/rmarkdown-action@v1 | |
with: | |
input_file: overview.Rmd | |
output_format: html_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 }} |