Skip to content

Commit

Permalink
Fixing Action
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoffat committed Feb 10, 2024
1 parent 9ced41b commit 2a92ee0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
59 changes: 40 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
# Upload entire repository
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 0 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 2a92ee0

Please sign in to comment.