Skip to content

Commit 19e2c82

Browse files
committed
chore: build site with different versions
1 parent 8616190 commit 19e2c82

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/tag.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 'Tag'
2+
on:
3+
push:
4+
tags:
5+
- 'v18.*'
6+
- '!*alpha*'
7+
8+
jobs:
9+
build-site:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- uses: nrwl/nx-set-shas@v2
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: '16'
19+
cache: 'yarn'
20+
- run: yarn install --frozen-lockfile
21+
- run: yarn nx build site --configuration=production --skip-nx-cache
22+
- uses: actions-ecosystem/action-regex-match@v2
23+
id: version-match
24+
with:
25+
text: ${{ github.ref_name }}
26+
regex: '^v[0-9]+'
27+
- uses: garygrossgarten/github-action-scp@release
28+
if: ${{ steps.version-match.outputs.match != '' }}
29+
with:
30+
local: './dist/packages/site'
31+
remote: '/var/www/${{ steps.version-match.outputs.match }}.react-devui.com'
32+
host: ${{ secrets.SSH_HOST }}
33+
port: ${{ secrets.SSH_PORT }}
34+
username: ${{ secrets.SSH_USER }}
35+
password: ${{ secrets.SSH_PASSWORD }}
36+
rmRemote: true
37+
dotfiles: true

0 commit comments

Comments
 (0)