This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
ci(azure): change app name #8
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: Publish Writerside and JSDoc documentation to Cloudflare Pages | |
on: | |
push: | |
branches: | |
- main | |
- 'Sprint-[0-9]*' | |
- 'patch-[0-9]*' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
env: | |
WRS_INSTANCE: docs/ucwa | |
WRS_ARTIFACT: webHelpUCWA2-all.zip | |
WRS_DOCKER_VERSION: 232.10275 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build jsdoc documentation | |
uses: andstor/jsdoc-action@v1 | |
with: | |
source_dir: . | |
recurse: true | |
output_dir: ./built_docs/jsdoc | |
- name: Build Writerside docs using Docker | |
uses: JetBrains/writerside-github-action@v4 | |
with: | |
instance: ${{ env.WRS_INSTANCE }} | |
artifact: ${{ env.WRS_ARTIFACT }} | |
docker-version: ${{ env.WRS_DOCKER_VERSION }} | |
- name: Upload Writerside documentation artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wrs_docs | |
path: | | |
artifacts/${{ env.WRS_ARTIFACT }} | |
artifacts/report.json | |
retention-days: 7 | |
- name: Test Writerside documentation | |
uses: JetBrains/writerside-checker-action@v1 | |
with: | |
instance: ${{ env.WRS_INSTANCE }} | |
- name: Unzip Writerside artifact | |
uses: montudor/action-zip@v1 | |
with: | |
args: unzip -qq artifacts/${{ env.WRS_ARTIFACT }} -d ./built_docs/handbook | |
- name: Archive documentation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: built_docs | |
retention-days: 7 | |
deploy: | |
name: Publish to Cloudflare Pages | |
runs-on: ubuntu-latest | |
needs: build | |
env: | |
CLOUDFLARE_PAGES_PROJECT_NAME: 'docs-svfmc' | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download documentation | |
uses: actions/download-artifact@v3 | |
with: | |
name: docs | |
path: built_docs | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@1 | |
id: deploy-to-cloudflare-pages | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: ${{ env.CLOUDFLARE_PAGES_PROJECT_NAME }} | |
directory: built_docs | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |