-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (56 loc) · 2.05 KB
/
nextjs.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Next.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Create env file
run: |
touch .env
echo "NEXT_ATLAS_URI=${{ secrets.NEXT_ATLAS_URI }}" >> .env
echo "NEXT_PUBLIC_HOSTNAME=${{ secrets.NEXT_PUBLIC_HOSTNAME }}" >> .env
echo "NEXT_OAUTH_ID=${{ secrets.NEXT_OAUTH_ID }}" >> .env
echo "NEXT_OAUTH_SECRET=${{ secrets.NEXT_OAUTH_SECRET }}" >> .env
echo "NEXT_SEND_EMAIL=${{ secrets.NEXT_SEND_EMAIL }}" >> .env
echo "NEXT_RESEND_API=${{ secrets.NEXT_RESEND_API }}" >> .env
echo "NEXT_UPLOADTHING_SECRET=${{ secrets.NEXT_UPLOADTHING_SECRET }}" >> .env
echo "NEXT_UPLOADTHING_APP_ID=${{ secrets.NEXT_UPLOADTHING_APP_ID }}" >> .env
echo "NEXT_TENNIS_CIRCLE_LOGO_URI=${{ secrets.NEXT_TENNIS_CIRCLE_LOGO_URI }}" >> .env
echo "NEXT_CONTENTFUL_API_KEY=${{ secrets.NEXT_CONTENTFUL_API_KEY }}" >> .env
echo "NEXT_CONTENTFUL_SPACE_ID=${{ secrets.NEXT_CONTENTFUL_SPACE_ID }}" >> .env
echo "NEXT_CONTENTFUL_CMA_TOKEN=${{ secrets.NEXT_CONTENTFUL_CMA_TOKEN }}" >> .env
cat .env
- name: Build
run: npm run build
- name: Run Linter
run: npm run lint
- name: Run Fix
run: npm run fix
- name: Save Lint and Fix Results
uses: actions/upload-artifact@v2
with:
name: lint-fix-results
path: |
.eslintcache
**/*.log