Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,29 @@ jobs:
with:
fetch-depth: 0

- name: build and deploy
- 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 GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
-e CLOUDFLARE_API_TOKEN=${{ secrets.CF_API_TOKEN }} \
app \
bash -c "npx semantic-release && npx wrangler deploy"
npx wrangler deploy
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Use Node.js 20 as the base image for stability and compatibility
FROM node:20-slim

# Install git for semantic-release and other tools
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Set the working directory inside the container
WORKDIR /app

Expand Down