Deploy Reference Documentation #1
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: powershell | |
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: microsoft/AL-Go-Actions/[email protected] | |
with: | |
shell: powershell | |
eventId: "DO0097" | |
- name: Read settings | |
uses: microsoft/AL-Go-Actions/[email protected] | |
with: | |
shell: powershell | |
- name: Determine Deployment Environments | |
id: DetermineDeploymentEnvironments | |
uses: microsoft/AL-Go-Actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
shell: powershell | |
getEnvironments: 'github-pages' | |
type: 'Publish' | |
- name: Setup Pages | |
if: steps.DetermineDeploymentEnvironments.outputs.deployALDocArtifact == 1 | |
uses: actions/configure-pages@v3 | |
- name: Build Reference Documentation | |
uses: microsoft/AL-Go-Actions/[email protected] | |
with: | |
shell: powershell | |
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 |