forked from synthetichealth/synthea
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (77 loc) · 2.81 KB
/
deploy.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-jdk8-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-jdk8
- name: Create Artifacts
run: |
./gradlew uberJar javadoc graphviz
mkdir -p output/build/javadoc
mv build/docs/javadoc/* output/build/javadoc
- name: Delete Previous master-branch-latest Tag
uses: dev-drprasad/[email protected]
with:
delete_release: true
tag_name: master-branch-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
# note id is referenced below in Deploy uberJar
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: master-branch-latest
draft: false
prerelease: true
- name: Deploy UberJar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
# This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`
asset_path: build/libs/synthea-with-dependencies.jar
asset_name: synthea-with-dependencies.jar
asset_content_type: application/java-archive
# it's necessary to add another "publish" after the upload, otherwise the release is always listed as "draft"
# see https://github.com/actions/upload-release-asset/issues/34
- name: Publish Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
replacesArtifacts: false
tag: master-branch-latest
token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
# note: watch for v4 to be released
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
# do not create a .nojekyll file
enable_jekyll: true
publish_dir: ./output
user_name: 'Jason Walonoski'
user_email: '[email protected]'
commit_message: rebuild graphs, javadoc and binary distribution at
# note the commit SHA is appended automatically