File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,29 @@ jobs:
1919 with :
2020 fetch-depth : 0
2121
22- - name : build and deploy
22+ - name : get node version
23+ run : echo "NODE_VERSION=$(node -p "JSON.parse(fs.readFileSync('./.versions','utf8')).node")" >> $GITHUB_OUTPUT
24+ id : node_version
25+
26+ - name : setup node
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : ${{ steps.node_version.outputs.NODE_VERSION }}
30+ cache : ' npm'
31+
32+ - name : install dependencies
33+ env :
34+ HUSKY : 0
35+ run : npm install
36+
37+ - name : run semantic-release
38+ run : npx semantic-release
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+
42+ - name : deploy to cloudflare workers
2343 run : |
2444 docker compose run --rm \
25- -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
2645 -e CLOUDFLARE_API_TOKEN=${{ secrets.CF_API_TOKEN }} \
2746 app \
28- bash -c " npx semantic-release && npx wrangler deploy"
47+ npx wrangler deploy
Original file line number Diff line number Diff line change 11# Use Node.js 20 as the base image for stability and compatibility
22FROM node:20-slim
33
4- # Install git for semantic-release and other tools
5- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6-
74# Set the working directory inside the container
85WORKDIR /app
96
You can’t perform that action at this time.
0 commit comments