rostemplate-gh-pages #470
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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, release] | |
| tags: ["*"] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "30 10 * * 4" | |
| workflow_run: | |
| workflows: [update-docs] | |
| types: completed | |
| branches: [main, master] | |
| name: rostemplate-gh-pages | |
| permissions: write-all | |
| # This will cancel running jobs once a new run is triggered | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| rostemplate-gh-pages: | |
| runs-on: ubuntu-latest | |
| if: > | |
| github.event_name != 'workflow_run' || | |
| github.event.workflow_run.conclusion == 'success' | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - 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 | |
| needs: website | |
| # https://github.com/r-lib/pkgdown/issues/2832 | |
| # Translate on web | |
| - name: Set locale to Spanish | |
| run: | | |
| sudo locale-gen es_ES.UTF-8 | |
| sudo update-locale LANG=es_ES.UTF-8 | |
| shell: bash | |
| - 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(clean = TRUE, run_dont_run = TRUE, new_process = TRUE)' | |
| env: | |
| LANG: es_ES.UTF-8 |