Skip to content

Merge branch 'main' of https://github.com/jacob-shuman/ephemurl-site #10

Merge branch 'main' of https://github.com/jacob-shuman/ephemurl-site

Merge branch 'main' of https://github.com/jacob-shuman/ephemurl-site #10

name: Deploy Ephemurl Counter
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "apps/counter/**"
jobs:
deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max_old_space_size=4096
ADAPTER: cloudflare
permissions:
contents: read
deployments: write
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- 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/counter --filter ./shared/*
- name: Build utils
run: pnpm utils build
- name: Build counter
run: pnpm counter build
- name: Deploy to cloudflare
run: pnpx wrangler pages deploy ./apps/counter/dist --project-name=ephemurl-counter --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=counter -t jacobshuman/ephemurl-counter:latest
- name: Push docker image
run: docker push jacobshuman/ephemurl-counter:latest