Skip to content

Commit

Permalink
publish.yml auto docs upload added
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Oct 5, 2023
1 parent 82ad530 commit 6b764e1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,41 @@ jobs:
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-docs:
name: Docs publish
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: master

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Generate docs
run: npm run doc

- name: Checkout docs branch
uses: actions/checkout@v4
with:
ref: docs
clean: false

- name: Copy docs to root
run: |
cp -r docs/* .
- name: Commit and push docs
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m "Update documentation"
git push

0 comments on commit 6b764e1

Please sign in to comment.