Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
cryptocurrencyresearch-org/.github/workflows/master.yml
View runs Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
57 lines (55 sloc)
1.94 KB
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: Run Crypto Tutorial | |
on: | |
schedule: | |
- cron: '35 00,12 * * *' | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v1 | |
with: | |
r-version: '4.0.3' | |
crayon.enabled: 'FALSE' | |
- uses: r-lib/actions/setup-pandoc@v1 | |
- uses: r-lib/actions/setup-tinytex@v1 | |
- name: Cache R packages | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: ${{ runner.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('.github/depends.Rds') }} | |
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-3- | |
- name: Install Packages | |
run: |- | |
Rscript -e "install.packages('renv')" | |
Rscript -e "install.packages('fastmap')" | |
Rscript -e 'renv::consent(provided = TRUE)' | |
Rscript -e "renv::restore()" | |
Rscript -e "update.packages('fastmap')" | |
Rscript -e "install.packages('bookdown', dependencies = TRUE)" | |
- name: Refresh book | |
run: | | |
pins_key <- "${{secrets.PAT_PINS}}" | |
bookdown::render_book('0-Introduction.Rmd', clean = TRUE) | |
shell: Rscript {0} | |
- name: Snapshot renv to update lockfile | |
run: |- | |
Rscript -e "renv::snapshot()" | |
- name: Add website front page | |
working-directory: ./ | |
run: | | |
ls | |
cp index.html _book | |
cp about-us.html _book | |
cp tools.html _book | |
- name: Update GitHub page | |
run: | | |
rm -r docs | |
cp -R _book docs | |
- name: Commit and push files | |
run: | | |
git config --local user.email "ries9112@colorado.edu" | |
git config --local user.name "ries9112" | |
git add . | |
git commit -m "Refresh entire book from CI automated process" -a | |
git push https://ries9112:${{secrets.GITHUB_TOKEN}}@github.com/ries9112/cryptocurrencyresearch-org.git HEAD:master --force |