Skip to content

Fix homepage generation #14

Fix homepage generation

Fix homepage generation #14

Workflow file for this run

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:
job:
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 "::warning 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'
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: Download Site Artifact
uses: actions/download-artifact@v2
with:
name: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2