-
-
Notifications
You must be signed in to change notification settings - Fork 2
115 lines (105 loc) · 2.96 KB
/
CI.yml
File metadata and controls
115 lines (105 loc) · 2.96 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
strategy:
matrix:
node-version: [lts/*, latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: install, lint, test, build
working-directory: ./uberpage
run: |
corepack enable
yarn install --immutable
yarn run lint
yarn run coverage
yarn run build
env:
CI: true
- name: Codacy Coverage Reporter
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
api-token: ${{ secrets.CODACY_API_TOKEN }}
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: uberpage/coverage/lcov.info
release:
needs: build
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-gh-page:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js latest
uses: actions/setup-node@v4
with:
node-version: latest
- name: Build for GH Page
working-directory: ./uberpage
run: |
corepack enable
yarn install --immutable
cp -f src/data.github.js src/data.js
../scripts/adjust_homepage.sh "https://stegschreck.github.io"
yarn run build
env:
CI: true
- name: Deploy GitHub Page
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref_name == 'master'
with:
repository-name: StegSchreck/stegschreck.github.io
branch: master
clean: true
folder: uberpage/build
token: ${{ secrets.GHA_PAT }}
deploy-aws:
needs: build
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js latest
uses: actions/setup-node@v4
with:
node-version: latest
- name: Build for AWS
working-directory: ./uberpage
run: |
corepack enable
yarn install --immutable
cp -f src/data.aws.js src/data.js
../scripts/adjust_homepage.sh "https://uberpage.schreck.berlin"
yarn run build
env:
CI: true
- name: Checkout code on S3
uses: reggionick/s3-deploy@v4
with:
folder: uberpage/build
bucket: ${{ secrets.AWS_S3_BUCKET }}
bucket-region: eu-central-1
dist-id: ${{ secrets.AWS_CLOUDFORNT_ID }}
delete-removed: true
no-cache: true
private: true