Skip to content

Commit

Permalink
Deploy docs to pages with native gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
gjermundgaraba committed Sep 9, 2024
1 parent cfdd68f commit 1282f57
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ on:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
deploy:
name: Deploy to GitHub Pages
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -30,12 +27,19 @@ jobs:
run: cd docs && npm ci
- name: Build website
run: cd docs && npm run build
- name: Upload artifact for pages
uses: actions/upload-pages-artifact@v3
with:
path: docs/build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 1282f57

Please sign in to comment.