-
Notifications
You must be signed in to change notification settings - Fork 4
96 lines (84 loc) · 3.18 KB
/
Copy pathbuild-elite.yml
File metadata and controls
96 lines (84 loc) · 3.18 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
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
# Copyright (C) 2020 Really Awesome Technology Ltd
#
# This file is part of RACTF.
#
# RACTF is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RACTF is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with RACTF. If not, see <https:#www.gnu.org/licenses/>.
name: Build (Elite)
on:
repository_dispatch:
types: [elite_build_deploy]
workflow_dispatch: null
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
ref: 11d2e4e920ad4883f4b4391282ba57328d017047
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Cache Node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci --progress=false
- name: Run Build
run: npm run build
env:
CI: "false"
REACT_APP_API_DOMAIN: https://api-elite.ractf.co.uk
REACT_APP_API_BASE: /api/v2
REACT_APP_WSS_URL: wss://api-elite.ractf.co.uk/api/v2/ws/
REACT_APP_SENTRY_DSN: https://b51135cca11047fe979c7b44cc35a404@o104250.ingest.sentry.io/1815863
REACT_APP_GA_UA: UA-167342912-2
RACTF_UI_KIT_THEME: csa
REACT_APP_MAP_PROVIDER: ${{ secrets.REACT_APP_MAP_PROVIDER }}
REACT_APP_SITE_NAME: "CS:Awesome"
REACT_APP_USE_HEAD_NAV: true
- name: Install Sentry CLI
run: curl -sL https://sentry.io/get-cli/ | bash
- name: Publish Sentry Release
run: >-
VERSION=$(sentry-cli releases propose-version) &&
sentry-cli releases new $VERSION &&
sentry-cli releases set-commits --auto $VERSION &&
sentry-cli releases files $VERSION upload-sourcemaps build &&
sentry-cli releases finalize $VERSION
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ractf
SENTRY_PROJECT: frontend
- name: Clear Sourcemaps
run: find . -type f -name '*.map' -delete
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_ELITE }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-2'
SOURCE_DIR: 'build'