Skip to content

Commit

Permalink
docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
Eonasdan committed Aug 15, 2024
1 parent 268cd13 commit 612c1f3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish Docs
on:
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/workflows/base
- name: Release
uses: ./.github/workflows/build
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Deploy Docs
uses: ./.github/workflows/docs
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .github/workflows/docs/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy Docs

inputs:
GITHUB_TOKEN:
description: 'A Github PAT'
required: true

runs:
using: composite
steps:
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
keep_files: true
6 changes: 2 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
VERSION: ${{ github.event.release.tag_name }}
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
uses: ./.github/workflows/docs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
keep_files: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down

0 comments on commit 612c1f3

Please sign in to comment.