Merge pull request #4031 from NikCharlebois/Integration-Test-Improvem… #1361
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Resources & Deploy GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
- Dev | |
jobs: | |
GenerateResource: | |
runs-on: windows-latest | |
# Only when run from the main repo | |
if: github.repository == 'microsoft/Microsoft365DSC' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Modules | |
shell: powershell | |
run: | | |
Import-Module -Name "./Modules/Microsoft365DSC" | |
Update-M365DSCResourceDocumentationPage -SourcePath ./Modules/Microsoft365DSC | |
New-M365DSCCmdletDocumentation | |
- name: Commit files # commit the output folder | |
if: always() | |
shell: pwsh | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "NikCharlebois" | |
git add D:/a/Microsoft365DSC/Microsoft365DSC/docs/docs/* | |
git pull | |
git commit -m "Updated Resources and Cmdlet documentation pages" | |
git push | |
$SHA = git rev-parse HEAD | |
echo "commitid=$SHA" >> $env:GITHUB_OUTPUT | |
deploy: | |
needs: GenerateResource | |
runs-on: ubuntu-latest | |
# Only when run from the main repo | |
if: github.repository == 'microsoft/Microsoft365DSC' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ needs.GenerateResource.outputs.commitid }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- run: | | |
pip install mkdocs-material | |
pip install mkdocs-include-dir-to-nav | |
- name: Deploy | |
working-directory: ./docs | |
run: mkdocs gh-deploy --force |