-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (46 loc) · 1.47 KB
/
deploy-site.yml
File metadata and controls
60 lines (46 loc) · 1.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
name: Deploy Ephemurl Site
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "apps/site/**"
- "shared/**"
jobs:
deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=4096
permissions:
contents: read
deployments: write
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm 🏗
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --filter ./apps/site --filter ./shared/*
- name: Build utils
run: pnpm utils build
- name: Build site
run: pnpm site build
- name: Deploy to cloudflare
run: pnpx wrangler pages deploy ./apps/site/.svelte-kit/cloudflare --project-name=ephemurl-site --commit-dirty=true
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Log in to docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Build docker image
run: docker build . -f ./Dockerfile.ci --build-arg APP=site -t jacobshuman/ephemurl-site:latest
- name: Push docker image
run: docker push jacobshuman/ephemurl-site:latest