LEGO: Pull request from users/loc/juno/hb_e8128129-2d33-4a21-9e80-44e341aa730f_20240403022519992 to main #4008
Workflow file for this run
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 Documentation | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [release] | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened, closed, labeled] | |
branches: | |
- main | |
jobs: | |
build_and_deploy_job: | |
if: | | |
( | |
github.event_name == 'push' | |
|| (github.event_name == 'pull_request' && github.event.action != 'closed') | |
|| (github.event.label.name == 'Documentation') | |
) | |
&& github.actor != 'csigs' | |
&& github.actor != 'azure-logic-apps-automation' | |
&& (contains(github.event.pull_request.labels.*.name, 'Documentation') || github.event_name == 'push') | |
runs-on: ubuntu-latest | |
name: Build and Deploy Job | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up Node.js version 20.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
- run: npm ci | |
working-directory: ./docs | |
- run: npm run build | |
working-directory: ./docs | |
- name: Build And Deploy | |
id: builddeploy | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | |
action: 'upload' | |
skip_app_build: true | |
app_build_command: 'cd docs && npm run build' | |
app_location: 'docs/build' | |
output_location: 'docs/build' | |
close_pull_request_job: | |
if: (github.event_name == 'pull_request' && github.event.action == 'closed') && github.actor != 'csigs' && github.actor != 'azure-logic-apps-automation' | |
runs-on: ubuntu-latest | |
name: Close Pull Request Job | |
steps: | |
- name: Close Pull Request | |
id: closepullrequest | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
app_location: 'docs/build' | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} | |
action: 'close' |