From 2a92ee04a821aa80a512b7976086b240fcd48f65 Mon Sep 17 00:00:00 2001 From: Rob Moffat Date: Sat, 10 Feb 2024 22:16:55 +0000 Subject: [PATCH] Fixing Action --- .github/workflows/deploy.yml | 59 ++++++++++++++++++++++++------------ docusaurus.config.js | 1 - 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 379e3767f..ec3fc5cc1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,34 +1,55 @@ -name: Deploy to GitHub Pages +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages on: + # Runs on pushes targeting the default branch push: - branches: - - master + 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: write + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +env: + # Hosted GitHub runners have 7 GB of memory available, let's use 6 GB + NODE_OPTIONS: --max-old-space-size=6144 jobs: + # Single deploy job since we're just deploying deploy: - name: Deploy to GitHub Pages + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version: 18 + node-version: 16.x cache: yarn - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Build website + run: yarn install --frozen-lockfile --non-interactive + - name: Build run: yarn build - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/main' + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build \ No newline at end of file + # Upload entire repository + path: build + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index a2607444d..11688a34b 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -25,7 +25,6 @@ const config = { // If you aren't using GitHub pages, you don't need these. organizationName: 'risk-first', // Usually your GitHub org/user name. projectName: 'website', // Usually your repo name. - deploymentBranch: 'master', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn',