-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 956 Bytes
/
build.yaml
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
on:
push:
branches:
- 'main'
name: Build
jobs:
build:
permissions:
contents: write
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- run: npm ci
- run: npm run build
- run: echo "DATE=$(date -Im | sed 's|:|_|g' | sed 's|+|__|g')" >> $GITHUB_ENV
- run: echo "DATE_RELEASE=$(date -Im)" >> $GITHUB_ENV
- uses: thedoctor0/[email protected]
with:
type: zip
filename: docs_${{ env.DATE }}.zip
directory: build
- uses: actions/upload-artifact@v3
with:
name: docs_${{ env.DATE }}
path: build/docs_${{ env.DATE }}.zip
- uses: ncipollo/release-action@v1
with:
artifacts: 'build/docs_${{ env.DATE }}.zip'
name: ${{ env.DATE_RELEASE }}
tag: ${{ env.DATE }}