tangled
alpha
login
or
join now
claycow.com
/
claycow
0
fork
atom
A Astro blog hosted on Vercel
0
fork
atom
overview
issues
pulls
pipelines
rework deployment action
Clayton Cook
6 months ago
5bfff7e4
cd29b0e0
+27
-39
3 changed files
expand all
collapse all
unified
split
.tangled
workflows
deploy.yaml
deploy.yml
package.json
+26
.tangled/workflows/deploy.yaml
···
1
1
+
name: Deploy to Vercel
2
2
+
3
3
+
when:
4
4
+
- event: ["push", "pull_request"]
5
5
+
branch: ["main"]
6
6
+
7
7
+
dependencies:
8
8
+
nixpkgs:
9
9
+
- nodejs
10
10
+
11
11
+
steps:
12
12
+
- name: Install dependencies
13
13
+
command: npm ci
14
14
+
15
15
+
- name: Build project
16
16
+
command: npm run build
17
17
+
18
18
+
- name: Deploy to Vercel
19
19
+
env:
20
20
+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
21
21
+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
22
22
+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
23
23
+
command: |
24
24
+
npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN
25
25
+
npx vercel build --prod --token=$VERCEL_TOKEN
26
26
+
npx vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
-35
.tangled/workflows/deploy.yml
···
1
1
-
name: Deploy to Vercel
2
2
-
3
3
-
on:
4
4
-
push:
5
5
-
branches:
6
6
-
- main
7
7
-
8
8
-
jobs:
9
9
-
deploy:
10
10
-
runs-on: ubuntu-latest
11
11
-
steps:
12
12
-
- name: Checkout repository
13
13
-
uses: actions/checkout@v4
14
14
-
15
15
-
- name: Setup Node.js
16
16
-
uses: actions/setup-node@v4
17
17
-
with:
18
18
-
node-version: "22"
19
19
-
cache: "npm"
20
20
-
21
21
-
- name: Install dependencies
22
22
-
run: npm ci
23
23
-
24
24
-
- name: Build project
25
25
-
run: npm run build
26
26
-
27
27
-
- name: Deploy to Vercel
28
28
-
env:
29
29
-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
30
30
-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
31
31
-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
32
32
-
run: |
33
33
-
npx vercel pull --yes --environment=production --token=$VERCEL_TOKEN
34
34
-
npx vercel build --prod --token=$VERCEL_TOKEN
35
35
-
npx vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
+1
-4
package.json
···
6
6
"dev": "astro dev",
7
7
"build": "astro build",
8
8
"preview": "astro preview",
9
9
-
"astro": "astro",
10
10
-
"vercel-login": "vercel login",
11
11
-
"deploy": "vercel --prod",
12
12
-
"vercel-env": "vercel env"
9
9
+
"astro": "astro"
13
10
},
14
11
"dependencies": {
15
12
"@astrojs/mdx": "^4.3.4",