Skip to content

fix: obsolete constructors should have the last priority whlie matching constructors (regression) #1729

fix: obsolete constructors should have the last priority whlie matching constructors (regression)

fix: obsolete constructors should have the last priority whlie matching constructors (regression) #1729

Workflow file for this run

name: docs
on:
workflow_call:
inputs:
deploy:
required: false
type: boolean
default: false
environment:
required: false
type: string
default: 'next'
version:
required: false
type: string
default: '0.0.1-dev'
workflow_dispatch:
inputs:
deploy:
required: false
type: boolean
default: true
description: A boolean indicating whether the built pages should be deployed
environment:
required: false
type: string
default: 'next'
description: The github deployment which is targeted, gets prefixed by 'docs-', should be 'next' or 'stable'
version:
required: false
type: string
default: '0.0.1-dev'
description: The version of Mapperly to be referenced from the documentation
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v3
- uses: actions/setup-dotnet@v3
- run: dotnet tool restore
- run: dotnet build
- uses: actions/setup-node@v4
with:
node-version-file: './docs/.node-version'
- run: npm ci
working-directory: ./docs
- run: npm run lint
working-directory: ./docs
- run: npm run build
working-directory: ./docs
env:
MAPPERLY_VERSION: ${{ inputs.version }}
ENVIRONMENT: ${{ inputs.environment }}
- uses: actions/upload-artifact@v3
with:
name: mapperly-docs
path: 'docs/build'
deploy:
if: ${{ inputs.deploy }}
permissions:
contents: read
pages: write
id-token: write
environment:
name: docs-${{ inputs.environment }}
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: true
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: mapperly-docs
path: 'docs/build'
# replace stable environment name with main
# cf pages only recognizes main as production branch
- uses: bluwy/substitute-string-action@v2
id: cf-pages-branch-name
with:
_input-text: ${{ inputs.environment }}
stable: main
- uses: cloudflare/pages-action@v1
id: deployment
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: mapperly
branch: ${{ steps.cf-pages-branch-name.outputs.result }}
directory: 'docs/build'