Skip to content

Set environment variables #23

Set environment variables

Set environment variables #23

Workflow file for this run

# name of workflow that will be displayed on the actions page
name: Create README.md
# execute workflow only when these files are modified
on:
push:
branches:
- 'main'
paths:
- 'create_readme.sh'
- 'readme.Rmd'
- '.github/workflows/create_readme.yml'
# a list of the jobs that run as part of the workflow
jobs:
make_markdown:
runs-on: ubuntu-latest
# a list of the steps that will run as part of the job
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "The workflow is now ready to test your code on the runner."
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown", repos="http://cran.us.r-project.org")'
- name: Build README
run: ./create_readme.sh
- name: Commit report
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add "README.md"
git commit -m "Build README.md"
git push origin main
- name: Install MkDocs
run: python -m pip install --upgrade pip && pip install mkdocs pymdown-extensions
- name: Build MkDocs site
run: |
cd mkdocs_site && mkdocs build
- name: Deploy MkDocs
run: |
git branch gh-pages
git pull
cd mkdocs_site && mkdocs gh-deploy
- run: echo "This job's status is ${{ job.status }}."