-
Notifications
You must be signed in to change notification settings - Fork 27
38 lines (33 loc) · 1.02 KB
/
R docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy R docs
on:
push:
branches:
- master
paths:
- r/docs/**
- .github/workflows/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
deploy-docs:
runs-on: ubuntu-latest
name: Deploy R docs
steps:
- uses: actions/checkout@v3
- name: Commit documentation changes
run: |
git clone https://github.com/${{ github.repository }}.git --branch gh-pages --single-branch gh-pages
cp -r r/docs/* gh-pages/R/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes to gh-pages branch
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}