Skip to content

Commit

Permalink
Deploy pkgdown to GH pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dfsnow committed Jul 4, 2023
1 parent b52d1df commit c559f46
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
pull_request:
push:
branches: [main, master]
Expand All @@ -17,8 +18,8 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
cancel-in-progress: false
permissions:
contents: write
contents: read
pages: write
id-token: write
steps:
- uses: actions/checkout@v3

Expand All @@ -38,10 +42,14 @@ jobs:
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
- name: Configure pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
clean: false
branch: gh-pages
folder: docs
path: 'docs'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
pull_request:
push:
branches: [main, master]
Expand Down

0 comments on commit c559f46

Please sign in to comment.