Skip to content

Commit

Permalink
changed pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen committed Feb 23, 2023
1 parent 2fff8d5 commit e2abb5e
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ param(
[switch] $ForceDocInit,

# Version suffix to prereleases
[int] $BuildNumber
[int] $BuildNumber,

# Use specific branch from PsBuildTasks.
[string] $PsBuildTaskBranch
)

$ModuleName = 'PsSqlClient'
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/build-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
4 changes: 4 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

The PowerShell SQL Client module replaces the SQL Server utilities [SQLCMD](https://docs.microsoft.com/de-de/sql/tools/sqlcmd-utility) and [BCP](https://docs.microsoft.com/en-us/sql/tools/BCP-utility) with native PowerShell commands.

For details, visit the [GitHub Pages](https://abbgrade.github.io/PsSqlClient/).

## Installation

This module can be installed from [PsGallery](https://www.powershellgallery.com/packages/PsSqlClient).
Expand All @@ -22,6 +24,8 @@ Invoke-Build Install

## Usage

See [the command reference](./docs/) for descriptions and examples.

### Copy from CSV to SQL database

```powershell
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Index
# Commands

<ul>
{% for page in site.pages %}
{% if page.title and page.title != 'Index' %}
{% if page.title and page.title != 'Commands' and page.dir == '/docs/' %}
<li><a href="{{ page.url | relative_url }}">{{ page.title }}</a></li>
{% endif %}
{% endfor %}
Expand Down
16 changes: 13 additions & 3 deletions tasks/PsBuild.Tasks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ task UpdateValidationWorkflow {
-OutFile $file
}

task UpdatePagesWorkflow {
[System.IO.FileInfo] $file = "$PSScriptRoot/../.github/workflows/build-pages.yml"
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
Invoke-WebRequest `
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/build-pages.yml" `
-OutFile $file
}

task UpdatePreReleaseWorkflow {
requires ModuleName
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\pre-release.yml"
Expand All @@ -42,6 +50,8 @@ task UpdateReleaseWorkflow {
Out-File $file -NoNewline
}

task UpdateWorkflows -Jobs UpdateValidationWorkflow, UpdatePagesWorkflow, UpdatePreReleaseWorkflow, UpdateReleaseWorkflow

#endregion
#region GitHub Pages

Expand All @@ -51,8 +61,8 @@ task UpdateIndexPage {
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/docs/index.md" `
-OutFile "$PSScriptRoot\..\docs\index.md"
Invoke-WebRequest `
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/docs/_config.yml" `
-OutFile "$PSScriptRoot\..\docs\_config.yml"
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/_config.yml" `
-OutFile "$PSScriptRoot\..\_config.yml"
}

#endregion
Expand Down Expand Up @@ -100,4 +110,4 @@ task UpdatePsBuildTasksTasks {

#endregion

task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateValidationWorkflow, UpdatePreReleaseWorkflow, UpdateReleaseWorkflow, UpdateIndexPage, UpdateDependabotConfig, UpdateVsCodeTasks, UpdateVsCodeLaunch, UpdatePsBuildTasksTasks
task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateWorkflows, UpdateIndexPage, UpdateDependabotConfig, UpdateVsCodeTasks, UpdateVsCodeLaunch, UpdatePsBuildTasksTasks

0 comments on commit e2abb5e

Please sign in to comment.