Skip to content

Commit

Permalink
Merge pull request #36 from ShaunLawrie/prerelease
Browse files Browse the repository at this point in the history
Update doc site with live examples
  • Loading branch information
ShaunLawrie authored Mar 15, 2024
2 parents 467f486 + 25e88fe commit de93eff
Show file tree
Hide file tree
Showing 195 changed files with 6,719 additions and 1,679 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.cast binary
20 changes: 20 additions & 0 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Version Bump
shell: pwsh
env:
Expand Down Expand Up @@ -60,6 +62,8 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Version Bump and Publish
shell: pwsh
env:
Expand Down Expand Up @@ -107,6 +111,22 @@ jobs:
# Create a gh release for it
gh release create "v$newVersion-$newPrereleaseTag" --target prerelease --generate-notes --prerelease
# Publish prerelease docs
Install-Module HelpOut -Scope CurrentUser -RequiredVersion 0.5 -Force
& .\PwshSpectreConsole.Docs\src\powershell\UpdateDocs.ps1 -NonInteractive -Branch "prerelease"
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=prerelease
- name: Upload Snapshots
if: failure()
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build Docs
shell: pwsh
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/unit-test-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ jobs:
unit-test:
name: Unit Test
runs-on: ubuntu-latest
if: github.repository_owner != 'ShaunLawrie' || !(github.ref == 'refs/heads/main' && github.ref == 'refs/heads/prerelease')
if: github.repository_owner != 'ShaunLawrie' || (github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prerelease')
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Unit Test
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
Write-Host "Working on ${{ github.ref }}"
& .\PwshSpectreConsole\Build.ps1
$env:PSModulePath = @($env:PSModulePath, ".\PwshSpectreConsole\") -join ":"
$PSVersionTable | Out-Host
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"powershell.codeFormatting.preset": "OTBS",
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnType": false
"editor.formatOnType": false,
"editor.tabSize": 4
}
112 changes: 0 additions & 112 deletions PwshSpectreConsole.Docs/UpdateDocs.ps1

This file was deleted.

5 changes: 3 additions & 2 deletions PwshSpectreConsole.Docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export default defineConfig({
starlight({
title: "PwshSpectreConsole",
editLink: {
baseUrl: "https://github.com/ShaunLawrie/PwshSpectreConsole/edit/main/PwshSpectreConsole.Docs/",
baseUrl:
"https://github.com/ShaunLawrie/PwshSpectreConsole/edit/main/PwshSpectreConsole.Docs/",
},
favicon: "/favicon.png",
customCss: ["./src/tailwind.css"],
Expand Down Expand Up @@ -46,5 +47,5 @@ export default defineConfig({
tailwind({
applyBaseStyles: false,
}),
],
]
});
Loading

0 comments on commit de93eff

Please sign in to comment.