From 9093f23aad0950c83dc04c3878a7fd0c464d02c5 Mon Sep 17 00:00:00 2001 From: Maxime Liquet <35924738+maximlt@users.noreply.github.com> Date: Thu, 18 Jan 2024 09:44:44 +0100 Subject: [PATCH] No longer use the pyviz-developers service account (#178) --- .github/workflows/docs.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b5424d0e7..efede9e82 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,6 +11,10 @@ on: - cron: "0 8 * 1-12 1" # Every monday at 8 am workflow_dispatch: +permissions: + # To allow the workflow to push to the origin, when actions/checkout is used. + contents: write + jobs: pre_ci: runs-on: 'ubuntu-latest' @@ -51,31 +55,28 @@ jobs: miniconda-version: "latest" - name: conda setup run: | - eval "$(conda shell.bash hook)" conda install anaconda-project anaconda-project prepare - name: Build cache run: | - eval "$(conda shell.bash hook)" anaconda-project run build_cache git config user.name github-actions git config user.email github-actions@github.com mv ./doc/_static/cache ./tmp - git fetch "https://github.com/$GITHUB_REPOSITORY.git" cache:refs/remotes/cache + git fetch origin cache git checkout cache mv ./tmp/* ./doc/_static/cache git add -f ./doc/_static/cache ls ./doc/_static/cache git commit -m "adding cached badges" - git push -f "https://pyviz-developers:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:cache + git push -f HEAD:cache - uses: actions/checkout@v3 with: clean: false - name: Build website run: | - eval "$(conda shell.bash hook)" git checkout -b deploy-tmp - git fetch "https://github.com/$GITHUB_REPOSITORY.git" cache:refs/remotes/cache # all cached badges are in this branch + git fetch origin cache # all cached badges are in this branch git checkout cache -- ./doc/_static/cache anaconda-project run build_website - name: git status