-
Notifications
You must be signed in to change notification settings - Fork 46
43 lines (38 loc) · 1.19 KB
/
deploy.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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deploy
on:
push:
branches: [ release ]
jobs:
deploy:
environment: Deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- run: yarn install
- run: rm -f src/data/tracks.json src/data/cars.json src/data/season.json src/data/contributors.json
- run: yarn scrapeData
env:
IWP_USERNAME: ${{ secrets.IWP_USERNAME }}
IWP_PASSWORD: ${{ secrets.IWP_PASSWORD }}
- run: yarn test
- run: yarn debugRaces
- run: yarn build
env:
NODE_ENV: production
- run: bundle exec s3_website push
env:
S3_ID: ${{ secrets.S3_ID }}
S3_SECRET: ${{ secrets.S3_SECRET }}