-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.25 KB
/
archive.yaml
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
39
40
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
# push:
# branches:
# - main
schedule:
- cron: "0 0 * * 0" # midnight on sunday
name: archive
jobs:
render:
name: archive
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GH_PAT }}
GH_KEY: ${{ secrets.GH_KEY }}
GH_SECRET: ${{ secrets.GH_SECRET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::gh
any::aws.s3
any::purrr
any::curl
- name: Copy data
run: Rscript -e 'source("R/archive.R")'
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add -A
git commit -m 'Data archived' || echo "No changes to commit"
git push origin || echo "No changes to commit"