-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (45 loc) · 1.31 KB
/
test-and-deploy.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
name: Test and Deploy
on:
# Cloudflare only deploys the "main" branch to Production. All other branches
# (like PRs) are deployed as previews.
push:
branches:
- "main"
pull_request:
# Allow Manual Runs
workflow_dispatch:
jobs:
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
uses: ./.github/actions/install-dependendencies
- name: Static Analysis
uses: ./.github/actions/static-analysis
publish:
name: Publish to Cloudflare Pages
needs: static-analysis
environment: production
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
uses: ./.github/actions/install-dependendencies
- name: Build
shell: bash
run: npm run build:production
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
accountId: 79fd517feb1d579982e26ccedd0fc4b3
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
directory: ./dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: is-there-a-fucking-rockies-game