Skip to content

Commit

Permalink
Fix the GH action for website deployment (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorbanianas authored Dec 6, 2024
1 parent 7c898a6 commit 5c28bd0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/WebsiteDeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
- main
paths:
- docs/**
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
Expand All @@ -17,31 +15,34 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci
working-directory: docs

- name: Build website
run: npm run build
working-directory: docs

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
path: docs/build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write
id-token: write

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -50,4 +51,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

0 comments on commit 5c28bd0

Please sign in to comment.