From ed48da12fdf8f015d6b43360b5aeacbb25d03bdc Mon Sep 17 00:00:00 2001 From: CJ Yetman Date: Mon, 9 Sep 2024 10:58:29 +0200 Subject: [PATCH] allow manual deploy-with-clean pkgdown deployment (#51) --- .github/workflows/pkgdown.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index beac40c..d0d82bd 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -8,9 +8,16 @@ on: release: types: [published] workflow_dispatch: + inputs: + clean: + type: boolean + description: 'Clean all files from old site.' + default: false name: pkgdown +permissions: read-all + jobs: pkgdown: runs-on: ubuntu-latest @@ -19,6 +26,8 @@ jobs: group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write steps: - uses: actions/checkout@v4 @@ -41,6 +50,6 @@ jobs: if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4.6.4 with: - clean: false + clean: ${{ github.event_name == 'workflow_dispatch' && inputs.clean || false }} branch: gh-pages folder: docs