dataplat / docs

The documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.
https://docs.dbatools.io
15 stars 12 forks source link

Setup GitHub Action to auto update files #43

Closed wsmelton closed 3 years ago

wsmelton commented 4 years ago

@potatoqualitee or @niphlod what is the external JSON file for?

I can set up an action that will pull the index file when we release it to the master branch. Just wondering what that external file is for where the version is being bumped on each release.

niphlod commented 4 years ago

Hi @wsmelton , it powers this section of the docs...basically a way to know docs are referring to which version (1) and static links on the side which should always come up (2)

image

wsmelton commented 4 years ago

Ah..ok. That makes sense. I can just add code that increments the value.

We also have the ability now to manually run task so if we wanted to wait until the release is in PS Gallery before updating this, we have that option. Makes it least the press of a button instead of having to commit.

wsmelton commented 3 years ago

@niphlod @potatoqualitee

Action has been published now for handling updating the assets. It is set to manually be triggered by those that can manage this repository.

  1. Go to the Actions tab of the repo
  2. Click on the update-assets workflow on the left side
  3. Click on the Run workflow drop-down on the right side
  4. Click the Run workflow button

image

Once the container spins up and starts running you will see an entry:

image

I set the bump version step to output the module version found and the value in the external file before it updates:

image

I use the auto-commit action on the builds site assets as well and works well. So if either file is changed through the workflow it will commit them, otherwise, the workflow will ignore the files.