Skip to content

Commit

Permalink
refactor(docs): removed git included docs, and added a github action …
Browse files Browse the repository at this point in the history
…to publish them to pages
  • Loading branch information
boenrobot committed Jun 11, 2024
1 parent 3c8ee15 commit 8b9193d
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 1,672 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Docs

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Enable corepack
run: |
corepack enable
corepack prepare yarn@stable --activate
- run: yarn
- run: yarn run dev:prepare
- run: yarn doc

- name: Upload artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: 'github-pages'
path: './docs'
if-no-files-found: error

deploy:
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 }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ node_modules

# Generated dirs
dist
/docs

# Nuxt
.nuxt
Expand Down
1 change: 0 additions & 1 deletion docs/.nojekyll

This file was deleted.

22 changes: 0 additions & 22 deletions docs/assets/highlight.css

This file was deleted.

15 changes: 0 additions & 15 deletions docs/assets/icons.js

This file was deleted.

Loading

0 comments on commit 8b9193d

Please sign in to comment.