Add docblocks #29
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 & Deploy Homepage | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/homepage.yml' | |
- 'StepLang.Homepage/**' | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/homepage.yml' | |
- 'StepLang.Homepage/**' | |
jobs: | |
build: | |
name: Build Homepage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Fetch all history for all tags and branches | |
run: | | |
git fetch --prune --unshallow | |
- name: Dotnet Setup | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.x | |
- name: Install DocFX | |
run: dotnet tool update -g docfx | |
- name: Build STEP | |
run: dotnet build StepLang/StepLang.csproj -c Release | |
- name: Generate Homepage | |
run: docfx StepLang.Homepage/docfx.json | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "StepLang.Homepage/_site/" | while read line; do | |
echo "::debug title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload Site artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
name: site | |
path: StepLang.Homepage/_site | |
deploy: | |
name: Deploy Homepage | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
needs: build | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 | |
with: | |
artifact_name: site |