Skip to content

Commit

Permalink
Update docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesLoder committed Sep 11, 2024
1 parent 609768e commit 44dfaf2
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# This is a basic workflow to help you get started with Actions

name: Build docs on version update

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events but only for the main branch
push:
tags:
- "*"
Expand All @@ -15,7 +13,6 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -24,11 +21,30 @@ jobs:
uses: actions/checkout@v2

- name: Install and Build
# use force because typedoc doesn't support current version of TS, but it still build
run: |
npm install
npm run docs
- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Auto-update documentation"
- name: Push changes
if: steps.git-check.outputs.changes == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main

- name: Deploy
uses: JamesIves/[email protected]
with:
Expand Down

0 comments on commit 44dfaf2

Please sign in to comment.