Skip to content

Bump actions/upload-artifact from 3 to 4 (#81) #75

Bump actions/upload-artifact from 3 to 4 (#81)

Bump actions/upload-artifact from 3 to 4 (#81) #75

Workflow file for this run

name: Deploy GitHub Pages
on:
push:
branches:
- main
jobs:
generate-openapi-spec:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.*
- name: Install dependencies
run: dotnet restore
- name: Install tools
run: dotnet tool restore
- name: Generate openapi.json
run: dotnet nswag run nswag.json
- name: Upload openapi.json
uses: actions/upload-artifact@v4
with:
name: spec-file
path: openapi.json
deploy:
needs: generate-openapi-spec
runs-on: ubuntu-latest
steps:
- name: Download openapi.json
uses: actions/download-artifact@v3
with:
name: spec-file
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: openapi.json
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: swagger-ui