From bf5178b29c28fe29d4276d7ada13b6c02598f42c Mon Sep 17 00:00:00 2001 From: Joxit Date: Thu, 11 Jan 2024 10:19:50 +0100 Subject: [PATCH] ci(gh-pages): use `actions/deploy-pages` action instage of gh-pages branch --- .github/workflows/gh-pages.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index a7322cf..1eb8693 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,19 +4,40 @@ on: branches: - main + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + jobs: gh-pages: - name: gh-pages + environment: + name: gh-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@master + - name: Setup Pages + uses: actions/configure-pages@v4 - uses: actions/setup-node@v2 with: node-version: "20.x" - run: npm install - run: npm run docs - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4.1.4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - branch: gh-pages - folder: docs \ No newline at end of file + path: './docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4