-
Notifications
You must be signed in to change notification settings - Fork 7
58 lines (56 loc) · 1.7 KB
/
master.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
name: CI
on:
push:
branches:
- master
jobs:
tests:
name: Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
env:
PEPY_API_KEY: ${{secrets.PEPY_API_KEY}}
CYPRESS_PEPY_TEST_USER_EMAIL: ${{secrets.PEPY_TEST_USER_EMAIL}}
CYPRESS_PEPY_TEST_USER_PASSWORD: ${{secrets.PEPY_TEST_USER_PASSWORD}}
with:
build: npm run build
start: npm run start
browser: chrome
publish:
needs:
- tests
runs-on: ubuntu-latest
environment: Production
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install dependencies
run: npm install
- name: Build site
run: npx @cloudflare/next-on-pages@1
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: c26be9b36a513ce4fc9074e8071346dd
projectName: pepy
branch: master
directory: .vercel/output/static
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: '3'