-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.55 KB
/
publish-codeql-docs.yml
File metadata and controls
40 lines (39 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Download and publish CodeQL docs artifact
on:
workflow_dispatch:
inputs:
download_branch:
description: The branch to download the artifacts from
required: true
destination:
description: The path to add the artifact to
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Delete existing docs folder
run: |
rm -r '${{ github.event.inputs.destination }}'/codeql;
rm -r '${{ github.event.inputs.destination }}'/learn-ql;
rm -r '${{ github.event.inputs.destination }}'/ql-handbook;
rm -r '${{ github.event.inputs.destination }}'/ql-support;
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.DOWNLOAD_ARTIFACT}}
workflow: __docs-generate-sphinx.yml
branch: '${{ github.event.inputs.download_branch }}'
repo: github/semmle-code
- name: Move artifact
run: mv artifact/** '${{ github.event.inputs.destination }}' && rm -r artifact
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: update codeql documentation
title: '[CodeQL docs] Automated PR to update the CodeQL docs (${{ github.event.inputs.download_branch }})'
body: |
PR generated by actions to update the CodeQL docs.
Updating from the '${{ github.event.inputs.download_branch }}' branch.
branch: codeql-docs-update/${{ github.event.inputs.download_branch }}
delete-branch: true