-
Notifications
You must be signed in to change notification settings - Fork 83
71 lines (63 loc) · 2.81 KB
/
SyncWiki.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Syncs our Wiki whenever we publish a new release
name: Sync Wiki
on:
release:
types: [published]
workflow_dispatch:
jobs:
sync_docs:
name: Sync docs
runs-on: ubuntu-latest
steps:
- name: Checkout current version
uses: actions/checkout@v2
# Retrieve our zipped build from a prior workflow
- name: Retrieve build artifacts
uses: dawidd6/action-download-artifact@v2
with:
# Required, workflow file name or ID
workflow: ContinuousIntegration.yml
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conclusion::
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
# Default: "completed,success"
workflow_conclusion: success
# Required, commit ID
commit: ${{github.event.release.head.sha}}
# Optional, uploaded artifact name,
# will download all artifacts if not specified
# and extract them in respective subdirectories
# https://github.com/actions/download-artifact#download-all-artifacts
name: build-artifact
# Optional, directory where to extract artifact
path: ./bin/Release
# Uncompress the build
- name: Uncompress build artifacts (may not be required if completed by the prior step)
run: Expand-Archive -Path build-artifact.zip -DestinationPath ./bin/Release
# Run our generator tests
- name: Add VSTest.console.exe to PATH
uses: darenm/[email protected]
- name: Generate updated wiki documentation from Tests output
run: vstest.console.exe Tests/bin/Release/Tests.dll /tests:GeneratorTests /Parallel /InIsolation
# Sync generated wiki files
- name: Sync wiki events (delete missing)
uses: kai-tub/external-repo-sync-action@v1
with:
source-directory: "./Release/Wiki" # Required
include-patterns: "./events/*" # Optional
delete-missing: true # Delete all files in the repo that are not present in the source-directory. Defaults to false
dry-run: true # Optional. Defaults to false
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
# Sync new or updated root wiki files (without deleting)
- name: Sync root wiki docs
uses: kai-tub/external-repo-sync-action@v1
with:
source-directory: "./Release/Wiki" # Required
exclude-patterns: "./events/*" # Optional
delete-missing: false # Delete all files in the repo that are not present in the source-directory. Defaults to false
dry-run: true # Optional. Defaults to false
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}