Deploy Reference Documentation #6
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: ' Deploy Reference Documentation' | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: read | |
pages: write | |
id-token: write | |
defaults: | |
run: | |
shell: pwsh | |
env: | |
ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} | |
ALGoRepoSettings: ${{ vars.ALGoRepoSettings }} | |
jobs: | |
DeployALDoc: | |
runs-on: [ windows-latest ] | |
name: Deploy Reference Documentation | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Initialize the workflow | |
id: init | |
uses: freddydk/AL-Go/Actions/WorkflowInitialize@aldocbug | |
with: | |
shell: pwsh | |
eventId: "DO0097" | |
- name: Read settings | |
uses: freddydk/AL-Go/Actions/ReadSettings@aldocbug | |
with: | |
shell: pwsh | |
- name: Determine Deployment Environments | |
id: DetermineDeploymentEnvironments | |
uses: freddydk/AL-Go/Actions/DetermineDeploymentEnvironments@aldocbug | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
shell: pwsh | |
getEnvironments: 'github-pages' | |
type: 'Publish' | |
- name: Setup Pages | |
if: steps.DetermineDeploymentEnvironments.outputs.deployALDocArtifact == 1 | |
uses: actions/configure-pages@v3 | |
- name: Build Reference Documentation | |
uses: freddydk/AL-Go/Actions/BuildReferenceDocumentation@aldocbug | |
with: | |
shell: pwsh | |
artifacts: 'latest' | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ".aldoc/_site/" | |
- name: Deploy to GitHub Pages | |
if: steps.DetermineDeploymentEnvironments.outputs.deployALDocArtifact == 1 | |
id: deployment | |
uses: actions/deploy-pages@v2 |