update project name #15
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: Deploy Docs to Production | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: self-hosted | |
environment: production | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up .NET and docfx | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "8.x" | |
- name: Install docfx | |
run: | | |
dotnet tool install --global docfx | |
docfx --version # Verify docfx installation | |
- name: Build docs with docfx | |
run: | | |
docfx build # Build the docs | |
- name: Zip the build output | |
run: | | |
$outputPath = './_site/*' # Path to the contents of the _site folder (not the folder itself) | |
$zipPath = 'C:\Hosting\CodeBlock.Dev\Production\Docs\docs.zip' # Path to where you want the zip file | |
# Create a zip of the contents of the _site folder | |
Compress-Archive -Path $outputPath -DestinationPath $zipPath -Force | |
- name: Extract zip | |
run: | | |
$destinationPath = 'C:\Hosting\CodeBlock.Dev\Production\Docs' | |
$zipFile = "$destinationPath\docs.zip" | |
# Extract the zip file to the IIS folder | |
Expand-Archive -Path $zipFile -DestinationPath $destinationPath -Force | |
# Remove the zip file after extraction | |
Remove-Item -Path $zipFile |