From 4341119a1762b6c015eab0123ffb82ccb782faf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs?= Date: Wed, 27 Sep 2023 23:45:31 +0200 Subject: [PATCH] Update website to match rOpenSpain --- .github/.gitignore | 2 + .github/workflows/rostemplate-docs.yaml | 47 +++++++++++++++++++++ .github/workflows/rostemplate-gh-pages.yaml | 39 +++++++++++++++++ _pkgdown.yml | 1 + 4 files changed, 89 insertions(+) create mode 100644 .github/workflows/rostemplate-docs.yaml create mode 100644 .github/workflows/rostemplate-gh-pages.yaml diff --git a/.github/.gitignore b/.github/.gitignore index 2d19fc7..0ce1091 100644 --- a/.github/.gitignore +++ b/.github/.gitignore @@ -1 +1,3 @@ *.html +R-version +depends.Rds diff --git a/.github/workflows/rostemplate-docs.yaml b/.github/workflows/rostemplate-docs.yaml new file mode 100644 index 0000000..a5647cf --- /dev/null +++ b/.github/workflows/rostemplate-docs.yaml @@ -0,0 +1,47 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + tags: ['*'] + +name: rostemplate-docs + +jobs: + rostemplate-docs: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + ESIOS_TOKEN: ${{ secrets.ESIOS_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: + local::. + any::pkgdown + ropenspain/rostemplate + any::ggplot2 + needs: website + + - name: Deploy package + run: | + Rscript -e 'pkgdown::clean_site()' + Rscript -e 'pkgdown::build_site(new_process = FALSE)' + + - name: Commit results + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add -A + git commit -m 'Build pkgdown' || echo "No changes to commit" + git push origin || echo "No changes to commit" + + diff --git a/.github/workflows/rostemplate-gh-pages.yaml b/.github/workflows/rostemplate-gh-pages.yaml new file mode 100644 index 0000000..8f85ae5 --- /dev/null +++ b/.github/workflows/rostemplate-gh-pages.yaml @@ -0,0 +1,39 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + tags: ['*'] + +name: rostemplate-gh-pages + +jobs: + rostemplate-gh-pages: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + ESIOS_TOKEN: ${{ secrets.ESIOS_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: + local::. + any::pkgdown + ropenspain/rostemplate + any::ggplot2 + needs: website + + - name: Deploy package + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + diff --git a/_pkgdown.yml b/_pkgdown.yml index e34726b..1ceaf87 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,5 +1,6 @@ url: https://llrs.github.io/resios/ template: + package: rostemplate bootstrap: 5 authors: LluĂ­s Revilla Sancho: