Skip to content

Commit

Permalink
add a workflow to publish pages
Browse files Browse the repository at this point in the history
  • Loading branch information
emilefokkema committed Sep 8, 2023
1 parent 4784e98 commit e66222b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish docs

on:
workflow_dispatch

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
- run: npm ci
- run: npm run docs:build
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/.vitepress/dist

publish:
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

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action


0 comments on commit e66222b

Please sign in to comment.