-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 1.96 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
name: Deploy
on:
workflow_run:
workflows: [Build]
types: [completed]
branches: [main]
jobs:
DocSite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
with:
java-version: '11'
distribution: 'adopt'
uses: actions/setup-java@v3
- name: Make site and scala doc
run: sbt makeSite
- name: Create Simulator WebApp
run: mkdir -p target/site/simulator/js/target/scala-3.1.1/
- name: Generate Simulator WebApp
run: sbt rootJS/fastOptJS
- name: Copy Simulator files to VirSim WebSite
run: |
cp root/index.html target/site/simulator/
cp root/style.css target/site/simulator/
cp root/js/target/scala-3.1.1/pps-22-virsim-fastopt.js target/site/simulator/js/target/scala-3.1.1/
- name: Publish Site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/site
keep_files: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'chore: update VirSim website'
Release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Build PDF
uses: andrea-acampora/action-md2pdf@1.0.0
with:
file_dir: doc/report
output_dir: doc
output_file_name: report.pdf
style_path: doc/config/style.css
- name: Generate Fat Jar
run: sbt rootJVM/assembly
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm install
npx semantic-release