- - name: Install R lessons package dependencies
- if: steps.check-rmd.outputs.count != 0
- working-directory: lesson
- run: |
- remotes::install_deps(dependencies = TRUE)
- file.remove("DESCRIPTION")
- shell: Rscript {0}
-
- - name: Determine the proper reference to use
- id: styles-ref
- run: |
- if [[ -n "${{ github.event.pull_request.number }}" ]]; then
- echo "::set-output name=ref::refs/pull/${{ github.event.pull_request.number }}/head"
- else
- echo "::set-output name=ref::gh-pages"
- fi
-
- - name: Sync lesson with carpentries/styles
- working-directory: lesson
- run: |
- git config --global user.email "team@carpentries.org"
- git config --global user.name "The Carpentries Bot"
- git remote add styles https://github.com/carpentries/styles.git
- git config --local remote.styles.tagOpt --no-tags
- git fetch styles ${{ steps.styles-ref.outputs.ref }}:styles-ref
- git merge -s recursive -Xtheirs --no-commit styles-ref
- git commit -m "Sync lesson with carpentries/styles"
-