Repository navigation
159 lines (145 loc) · 4.47 KB
/
Copy pathpull-request.yaml
File metadata and controls
159 lines (145 loc) · 4.47 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# This is a basic workflow to automatically build a Svelte app and deploy it to GitHub Pages
concurrency:
cancel-in-progress: true
group: ${{ github.head_ref }}
permissions:
contents: read
deployments: write
jobs:
changesets:
if: ${{ github.event.pull_request.title != 'Version packages' }}
name: Changesets
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v6
- name: Setup environment
uses: ./.github/actions/env-setup
with:
fetch-depth: 0
node-version: 24.14.1
pnpm-version: 10.33.0
- name: Verify changeset
run: |
pnpm exec changeset status --since=origin/master
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v6
# with:
# fetch-depth: 1
- name: Setup environment
uses: ./.github/actions/env-setup
with:
node-version: 24.14.1
pnpm-version: 10.33.0
- name: Lint
run: |
pnpm lint
- if: always()
name: Update ESLint cache
run: |
find . -name ".eslintcache" -type f -exec touch {} +
publish-web-app:
environment:
name: Previews
url: ${{ steps.deploy.outputs.pages-deployment-alias-url || steps.deploy.outputs.deployment-url }}
name: Deploy Webapp
needs: [changesets, lint, verify]
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v6
# with:
# fetch-depth: 1
- name: Setup environment
uses: ./.github/actions/env-setup
with:
node-version: 24.14.1
pnpm-version: 10.33.0
- env:
IS_CI: false
name: Build
run: |
pnpm run build
- name: Publish Web App
id: deploy
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy ./.svelte-kit/cloudflare --project-name=dle-dev-staging --branch=${{ github.head_ref }}
packageManager: pnpm
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v6
# with:
# fetch-depth: 1
- name: Setup environment
uses: ./.github/actions/env-setup
with:
node-version: 24.14.1
pnpm-version: 10.33.0
- name: Verify
run: |
pnpm run check
name: Pull Request
on:
pull_request: null
workflow_dispatch:
inputs:
force_deploy:
default: false
description: Force deploy all applications
required: false
type: boolean
# Optional: Change the working directory
# workingDirectory: my-site
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
# Disable until I can figure out a way to deal with the flaky tests
# E2E_TEST:
# name: Run E2E Tests
# needs: [Install-Dependencies]
# runs-on: ubuntu-latest
# steps:
# - name: Setup FFmpeg
# uses: AnimMouse/setup-ffmpeg@v1
# - uses: actions/checkout@v4
# - name: Set up Services
# run: |
# sudo docker-compose up -d
# - uses: pnpm/action-setup@v4
# with:
# version: 10.33.0
# - uses: actions/setup-node@v4
# with:
# node-version: '24.14.1'
# cache: 'pnpm'
# - uses: actions/cache@v4
# with:
# path: ./node_modules
# key: ${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}
# - name: Prisma Generate
# run: |
# pnpm prisma:gen:dev
# - name: Prisma Push
# run: |
# pnpm prisma:push:dev
# - name: Install Playwright Browsers
# run: |
# pnpm exec playwright install
# pnpm playwright install-deps chromium
# - name: e2e Test
# run: |
# pnpm run test:e2e:ci
# - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: playwright-report
# path: test-results/
# retention-days: 5