Skip to content

Commit

Permalink
Add workflow to publish on GH pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter9192 committed Aug 1, 2024
1 parent ddbf519 commit 22dd4b5
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy

permissions:
contents: read
pages: write
id-token: write

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"

- name: Install and Build
run: |
npm install
npx honkit build
- name: upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_book"

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 22dd4b5

Please sign in to comment.