diff --git a/.github/workflows/CreateGitHubPagesForR.yml b/.github/workflows/CreateGitHubPagesForR.yml deleted file mode 100644 index 1821fc2a..00000000 --- a/.github/workflows/CreateGitHubPagesForR.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Create GitHub pages for an R package - -on: - workflow_call: - inputs: - pkgdown_mode: - required: true - type: string - enum: ['devel', 'release'] - extra_r_packages: - required: false - type: string - gh-pages-branch: - required: false - type: string - default: 'gh-pages' - -jobs: - build: - runs-on: windows-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - PKGDOWN_MODE: ${{ inputs.pkgdown_mode }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - name: Setup Pandoc - uses: r-lib/actions/setup-pandoc@v2 - - name: Install required packages - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - ${{ inputs.extra_r_packages }} - any::pkgdown - local::. - needs: website - - name: Remove build number from the DESCRIPTION and build site - run: | - description <- readLines('DESCRIPTION') - versionLine <- grep(pattern = 'Version: [0-9]\\.[0-9]\\.[0-9]', description) - description[versionLine] <- gsub(pattern = '\\.[0-9]$', replacement = '', description[versionLine]) - writeLines(description, 'DESCRIPTION') - options(yaml.eval.expr=TRUE) - pkgdown::build_site(devel=TRUE, install=TRUE) - shell: Rscript {0} - # The project is then uploaded as an artifact named 'docs'. - - name: Upload Artifacts - uses: actions/upload-artifact@v1 - with: - name: docs - path: docs - - deploy: - concurrency: ci-${{ github.ref }} - # The second job must depend on the first one to complete before running and uses ubuntu-latest instead of windows. - needs: [build] - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout - uses: actions/checkout@v4 - # The built project is downloaded into the 'docs' folder. - - name: Download Artifacts - uses: actions/download-artifact@v1 - with: - name: docs - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 - # The deployment folder should match the name of the artifact. - # Clean is false to prevent removing release site - # only target folder of repo from gh-pages branch is updated - with: - folder: docs - clean: false - branch: ${{ inputs.gh-pages-branch }} - target-folder: docs - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/update-dev-website.yml b/.github/workflows/update-dev-website.yml index 486810d5..8173a2b5 100644 --- a/.github/workflows/update-dev-website.yml +++ b/.github/workflows/update-dev-website.yml @@ -11,7 +11,7 @@ permissions: jobs: update_dev_website: - uses: Yuri05/Test04/.github/workflows/CreateGitHubPagesForR.yml@main + uses: Yuri05/Test20/.github/workflows/CreateGitHubPagesForR.yml@main with: pkgdown_mode: 'devel' extra_r_packages: 'github::Open-Systems-Pharmacology/OSPSuite.RUtils'