Skip to content

Migrating to Bootstrap 5 #39

Migrating to Bootstrap 5

Migrating to Bootstrap 5 #39

name: pull data from MDEB data hub
on:
push:
branches:
- main2
pull_request:
branches:
- main2
#schedule:
# uses UTC/GMT time (+ 5 hrs)
## put on HOLD temporarily
#- cron: "0 17 * * 3" # Every Wednesday at 1200 hrs = 1700 UTC
jobs:

Check failure on line 17 in .github/workflows/update_mdeb_data.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/update_mdeb_data.yaml

Invalid workflow file

You have an error in your yaml syntax on line 17
build:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GH_RELEASE }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: false
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install command line packages
run: |
sudo apt update
sudo apt-get install libcurl4-openssl-dev libgit2-dev
# sudo apt-get install libgdal-dev libcurl4-gnutls-dev libgit2-dev libudunits2-dev libharfbuzz-dev libfribidi-dev
shell: bash
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.2.0'
- name: Install packages
run: |
install.packages(c("remotes","jsonlite", "dplyr", "httr2", "here", "sf","rmarkdown"))
remotes::install_github("NEFSC/NEFSC-Spatial")
shell: Rscript {0}
- name: Pull MDEB data and save to repo
run: |
options(timeout = 60 * 60 * 6)
source(here::here("data-raw/get_mdeb_for_package.R"))
get_mdeb_for_package()
shell: Rscript {0}
- name: Make Comparisons for commit
# check for new data added or data omitted. Not concerned with data fixes
# update NEWS.md, DESCRIPTION with version/notes
# increments package version in description
run: |
options(timeout = 60 * 60 * 6)
source(here::here("data-raw/compare_data.r"))
source(here::here("data-raw/update_description.R"))
source(here::here("data-raw/update_news.R"))
diffs <- compare_data()
version <- update_description(diffs, digit=3)
update_news(version, diffs)
rmarkdown::render(here::here("data-raw/sendAsEmail.Rmd"),
params = diffs)
saveRDS(version,here::here("data-raw/version.rds"))
shell: Rscript {0}
- name: render readme.rmd
run: |
options(timeout = 60 * 60 * 6)
rmarkdown::render(here::here("README.Rmd"))
shell: Rscript {0}
# Send email indicating if anything has changed
# - name: Send email
# uses: dawidd6/action-send-mail@v3
#
# with:
# server_address: smtp.gmail.com
# server_port: 465
#
# username: ${{ secrets.MAIL_USERNAME }}
# password: ${{ secrets.MAIL_PASSWORD }}
#
# subject: Github Actions job result
# to: andrew.beet@noaa.gov
#
# from: NEFSCspatial GitHub
#
# #body: file://${{github.workspace}}/data-raw/datapull.txt
#
# html_body: file://${{github.workspace}}/data-raw/sendAsEmail.html
#
# #attachments: ./data-raw/sendAsEmail.html
#
# - name: commit data files
# run: |
# git config user.name github-actions
# git config user.email github-actions@github.com
# git add data/*
# git add README.md
# git add NEWS.md
# git add DESCRIPTION
# git commit -m "automated mdeb pull from update_mdeb_data yml"
# git push
#
# - name: create gh-release
# run: |
# version <- readRDS(here::here("data-raw/version.rds"))
# if(!is.null(version)){
# usethis::use_github_release(publish = TRUE)
# }
# shell: Rscript {0}