Merge pull request #30 from ShaunLawrie/prerelease #12
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: Publish Doc Site | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy | |
if: github.repository_owner == 'ShaunLawrie' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build Docs | |
shell: pwsh | |
run: | | |
$ErrorActionPreference = "Stop" | |
& .\PwshSpectreConsole\Build.ps1 | |
Install-Module HelpOut -Scope CurrentUser -Force | |
& .\PwshSpectreConsole.Docs\UpdateDocs.ps1 -NonInteractive | |
git config --global user.name 'Shaun Lawrie (via GitHub Actions)' | |
git config --global user.email '[email protected]' | |
git add PwshSpectreConsole.Docs/src/content || true | |
git commit -m "[skip ci] Update docs" || true | |
git push || true | |
- name: Deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
workingDirectory: "./PwshSpectreConsole.Docs/dist" | |
command: pages deploy . --project-name pwshspectreconsole --commit-dirty=true --branch=main |