-
Notifications
You must be signed in to change notification settings - Fork 28
64 lines (61 loc) · 2.15 KB
/
yarn.yml
File metadata and controls
64 lines (61 loc) · 2.15 KB
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
name: Website Yarn Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
name: CloudNet Website Build
steps:
- uses: actions/checkout@v2
- name: Set up Node 14
uses: actions/setup-node@v2
with:
node-version: 14
check-latest: true
- name: Install yarn
uses: bahmutov/npm-install@v1
with:
install-command: yarn --frozen-lockfile
- name: Check codestyle
uses: wearerequired/lint-action@v1
if: ${{ github.repository == 'CloudNetService/website' }}
with:
eslint: true
eslint_extensions: js,jsx,md,mdx,ts,tsx
prettier: true
prettier_extensions: js,jsx,css,md,mdx,ts,tsx
neutral_check_on_warning: true
- name: Check codestyle on external repositories
if: ${{ github.repository != 'CloudNetService/website' }}
run: yarn test
- name: Sync translations
env:
CROWDIN_PROJECT_ID: 4
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
if: ${{ github.ref == 'refs/heads/development' }}
run: yarn run crowdin:sync
- name: Download translations
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
if: ${{ github.ref == 'refs/heads/main' }}
run: yarn run crowdin download
- name: Build website
run: yarn build
- name: Copy robots.txt to non-productive envs
if: ${{ github.ref != 'refs/heads/main' }}
uses: canastro/copy-file-action@master
with:
source: "template/dev/robots.txt"
target: "build/robots.txt"
- name: Copy robots.txt to productive envs
if: ${{ github.ref == 'refs/heads/main' }}
uses: canastro/copy-file-action@master
with:
source: "template/prod/robots.txt"
target: "build/robots.txt"
- name: Upload artifact
uses: actions/upload-artifact@v2
if: success()
with:
name: cloudnetservice-website-node14-${{ github.sha }}
path: build/