-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (48 loc) · 1.48 KB
/
generate.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
name: Generate nuxt static files
on:
push:
branches: ['main']
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Cache yarn dependencies
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: corepack yarn
- name: Generate nuxt static files
run: corepack yarn generate
- name: Create Tarball
uses: a7ul/tar-action@v1.1.0
with:
command: c
cwd: .output
files: |
./public
outPath: ${{ github.workspace }}/mirror-frontend.tar.gz
- name: Upload Tarball
uses: fjogeleit/http-request-action@v1
with:
url: 'https://jfrog.lcpu.dev/artifactory/mirror/mirror-frontend.tar.gz'
method: 'PUT'
bearerToken: ${{ secrets.JFROG_BEARER_TOKEN }}
file: ${{ github.workspace }}/mirror-frontend.tar.gz