-
Notifications
You must be signed in to change notification settings - Fork 78
77 lines (62 loc) · 2.09 KB
/
next-s3-upload.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
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on: [push, pull_request]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['20.x']
os: [ubuntu-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Build
run: yarn workspace next-s3-upload build
docs:
name: Build the docs site and run tests against its examples
runs-on: ubuntu-latest
env:
S3_UPLOAD_KEY: ${{ secrets.S3_UPLOAD_KEY }}
S3_UPLOAD_SECRET: ${{ secrets.S3_UPLOAD_SECRET }}
S3_UPLOAD_BUCKET: next-uploads-1
S3_UPLOAD_REGION: us-east-1
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
R2_BUCKET: next-s3-upload
SPACES_KEY: ${{ secrets.SPACES_KEY }}
SPACES_SECRET: ${{ secrets.SPACES_SECRET }}
SPACES_BUCKET: next-s3-upload
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 20.9.0
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build addon
run: yarn workspace next-s3-upload build
- name: Cypress tests
uses: cypress-io/github-action@v2
with:
install-command: yarn install --frozen-lockfile
build: yarn workspace docs-site build
start: yarn workspace docs-site start
wait-on: "http://localhost:3000"
command: yarn workspace docs-site cypress run
- name: Upload Cypress Screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: packages/docs-site/cypress/screenshots