-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.11 KB
/
deploy.yml
File metadata and controls
47 lines (39 loc) · 1.11 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
name: release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false # Don't cancel deployments in progress
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: get node version
run: echo "NODE_VERSION=$(node -p "JSON.parse(fs.readFileSync('./.versions','utf8')).node")" >> $GITHUB_OUTPUT
id: node_version
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
cache: 'npm'
- name: install dependencies
env:
HUSKY: 0
run: npm install
- name: run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: deploy to cloudflare workers
run: |
docker compose run --rm \
-e CLOUDFLARE_API_TOKEN=${{ secrets.CF_API_TOKEN }} \
app \
npx wrangler deploy