Advanced GitHub

https://debruine.github.io/talks/rostock-github/

Lisa DeBruine

Task List

GitHub Org

Create Your GitHub Repo

Fork

Clone the Repo

RStudio

usethis::create_from_github("debruine/rostock-debruine")

Command Line

git clone https://github.com/debruine/rostock-debruine

Create a Website

  • project:
      type: website
      output-dir: docs
    
    website:
      title: "Lisa's Advanced Github Notes"
    
    format:
      html:
        theme: slate
  • Render the website

    quarto render

Commit and Push

  • git status
    git add *
  • git commit -m "First commit"
  • git push

GitHub Pages

Pull Request

GitHub Pages (again)

GitHub Actions

  • quarto publish gh-pages
  • name: Render and Publish
    on:
      push:
        branches:
          - main  
    
    jobs:
      build-deploy:
          runs-on: ubuntu-latest
          permissions:
            contents: write
          steps:
            - name: Check out repository
              uses: actions/checkout@v4
    
            - name: Set up Quarto
              uses: quarto-dev/quarto-actions/setup@v2
              with:
                version: 1.5.57
    
            - name: Publish to GitHub Pages (and render)
              uses: quarto-dev/quarto-actions/publish@v2
              with:
                target: gh-pages
              env:
                QUARTO_PROFILE: website
                GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Base Repo

Pull Request Another Repo

Further Resources

Thank You!

https://debruine.github.io/talks/rostock-github/