Skip to content

Commit

Permalink
Merge pull request #4801 from solgenomics/topic/gitbook_update
Browse files Browse the repository at this point in the history
changes for gitbook manual to switch from merge to pull build
  • Loading branch information
lukasmueller authored Feb 1, 2024
2 parents 704bdc8 + f7ccdbb commit 46e1e2f
Show file tree
Hide file tree
Showing 56 changed files with 18,920 additions and 39 deletions.
39 changes: 10 additions & 29 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
push:
branches: ["master"]
paths:
- 'docs/r_markdown_docs/**'
- 'docs/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
contents: read
pages: write
id-token: write

Expand All @@ -25,42 +25,23 @@ concurrency:

jobs:
# Single deploy job since we're just deploying
build_and_deploy_static_pages_for_manual:
runs-on: ubuntu-latest
container:
image: bienkowskid/fedora40-r-bookdown
deploy_static_pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.MANUAL_GITACTION }}
- name: Save directory for checkout
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Create gitbook
working-directory: ./docs/r_markdown_docs
run: R -q -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")'
- name: Create manual pdf
working-directory: ./docs/r_markdown_docs
run: R -q -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")'
- name: Commit and push documentation
run: |
date > generated.txt
git config user.name github-actions
git config user.email [email protected]
git add --force docs/*.*
git commit -m "generated"
git push
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
# Upload docs only
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

uses: actions/deploy-pages@v4


30 changes: 21 additions & 9 deletions .github/workflows/test_static.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
# Simple workflow for test documentation build through R bookdown
name: Test built of documentation folder
# Simple workflow for deploying static content to GitHub Pages
name: Build documentation with R bookmark

on:
# Runs on pull requests
# Runs on pushes/marge targeting the default branch
pull_request:
paths:
- 'docs/r_markdown_docs/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
contents: write
id-token: write

jobs:
# Single deploy job since we're just testing
build_static_pages_for_manual:
# Single deploy job since we're just deploying
build_and_deploy_static_pages_for_manual:
runs-on: ubuntu-latest
container:
image: bienkowskid/fedora40-r-bookdown
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Save directory for checkout
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Create gitbook
working-directory: ./docs/r_markdown_docs
run: R -q -e 'bookdown::render_book("index.Rmd", "bookdown::gitbook")'
- name: Create manual pdf
working-directory: ./docs/r_markdown_docs
run: R -q -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")'

run: R -q -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")'
- name: Commit and push documentation
run: |
date > generated.txt
git config user.name github-actions
git config user.email [email protected]
git add --force --all docs/
git commit -m "update bookdown docs"
git push
428 changes: 428 additions & 0 deletions docs/404.html

Large diffs are not rendered by default.

Binary file added docs/BreedbaseManual.pdf
Binary file not shown.
Loading

0 comments on commit 46e1e2f

Please sign in to comment.