From a62797d27a96b52869ed8c88cccf63830c3f71e1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 22:03:24 +0000 Subject: [PATCH 1/2] Bump actions/upload-artifact from 2 to 3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/deploy-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 614a79f97..cd87a9be3 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -41,7 +41,7 @@ jobs: - name: Upload build artifact 📤 if: github.event_name != 'pull_request' # We only need the build if we deploy it later. - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: build-folder path: docs/build/ From ca665de051c7a9e1e72d6bd82e0a26dd40ca44fc Mon Sep 17 00:00:00 2001 From: Mykhailo <90206262+Morphenoed@users.noreply.github.com> Date: Wed, 25 Dec 2024 18:56:13 +0100 Subject: [PATCH 2/2] Update deploy-docs.yml --- .github/workflows/deploy-docs.yml | 72 ++++++++++++------------------- 1 file changed, 28 insertions(+), 44 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index cd87a9be3..bee217012 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -9,25 +9,31 @@ on: branches: - main +permissions: + contents: read + pages: write + id-token: write + jobs: - build: + build_and_deploy: name: Build Docs runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. - with: - persist-credentials: false + uses: actions/checkout@v3 - - name: Setup Node.js 🧱 - uses: actions/setup-node@v2.1.5 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - node-version: 14.x - - - name: Install pnpm 🏃‍♀️ - run: npm i -g pnpm - + node-version: 20.x + + - name: Enable Corepack + run: corepack enable + + - name: Prepare pnpm using Corepack + run: corepack prepare pnpm + - name: Install node packages 📦 run: | pnpm install --frozen-lockfile @@ -38,37 +44,15 @@ jobs: working-directory: docs/ run: | pnpm build - - - name: Upload build artifact 📤 - if: github.event_name != 'pull_request' # We only need the build if we deploy it later. - uses: actions/upload-artifact@v3 - with: - name: build-folder - path: docs/build/ - retention-days: 1 # Keep the artifact for the minimal amount of time possible. - - deploy: - name: Deploy Docs - needs: build - if: success() && github.event_name != 'pull_request' # Only deploy the build if it is a push to the main branch and the build was successful. - runs-on: ubuntu-latest - - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. - with: - persist-credentials: false - - - name: Download build artifact 📥 - uses: actions/download-artifact@v2 - with: - name: build-folder - path: docs/build/ - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4.1.0 + - name: Setup Pages + if: github.event_name != 'pull_request' + uses: actions/configure-pages@v5 + - name: Upload artifact + if: github.event_name != 'pull_request' + uses: actions/upload-pages-artifact@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages # The branch the action should deploy to. - folder: docs/build # The folder the action should deploy. The same as in "Download Build" step. - clean: true # Automatically remove deleted files from the deploy branch + path: 'docs/build' + - name: Deploy to GitHub Pages + if: github.event_name != 'pull_request' + id: deployment + uses: actions/deploy-pages@v4