Skip to content

Commit

Permalink
add the working directory attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dorbanianas committed Dec 6, 2024
1 parent 4d49911 commit bf09e74
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/WebsiteDeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
# branches:
# - main
# paths:
# - docs/** # Trigger action on changes inside docs/
# - docs/**

jobs:
build:
Expand All @@ -14,39 +14,37 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history for GitHub Pages
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm # Enable npm caching
cache: npm

- name: Install dependencies
run: |
cd docs # Navigate to docs folder
npm ci # Clean install dependencies
run: npm ci # Install dependencies in the docs directory
working-directory: docs # Set working directory to docs

- name: Build website
run: |
cd docs # Navigate to docs folder
npm run build # Build the Docusaurus website
run: npm run build # Build the Docusaurus site
working-directory: docs # Set working directory to docs

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/build # Specify the build folder inside docs
path: docs/build # Specify the build folder in docs

deploy:
name: Deploy to GitHub Pages
needs: build # Ensure deployment happens after build
needs: build

permissions:
pages: write # Required permissions to deploy
id-token: write # Verify the deployment source
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }} # URL of the deployed site
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit bf09e74

Please sign in to comment.