-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (88 loc) · 2.52 KB
/
AIO.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: ALL in one
on:
workflow_dispatch:
inputs:
name:
description: "Build"
required: False
default: ""
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
- name: Draft Release
# Only run on new tags and upload the AIO file
uses: actions/create-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
body: |
AIO file for this release is attached.
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
docgen:
name: "DocGen"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.MILE_PAT }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install --save jsdom wkhtmltopdf
- name: Generate docs
run: npm run docgen
# Should commit the docs folder to the repo
- name: Commit docs
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update docs"
commit_options: "--no-verify --signoff"
commit_user_name: "GitHub Actions"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "GitHub Actions <github-actions[bot]@users.noreply.github.com>"
file_pattern: docs/DOCGEN.mil