Skip to content

feat: implement basic tags #60

feat: implement basic tags

feat: implement basic tags #60

name: Next Integration
on:
pull_request
env:
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
PAGES_PROJECT_NAME: shafa-next
DEPLOY_TAG: shafa-next-stage-${{ github.event.number }}
DEPLOY_ROUTE: https://shafa-next-stage-${{ github.event.number }}.shafa-next.pages.dev
jobs:
format_checks:
name: Format Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: next/package-lock.json
- name: Install Dependencies
run: npm ci
working-directory: next
- name: Check Next Lint
run: npm run check-lint
working-directory: next
cf_deploy_next_stage:
name: Deploy Next to Stage
runs-on: ubuntu-latest
needs: format_checks
environment:
name: next-stage-${{ github.event.number }}
url: ${{ env.DEPLOY_ROUTE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: next/package-lock.json
- name: Install Dependencies
run: npm ci
working-directory: next
- name: Install Dependencies
run: npm ci
working-directory: hono
- name: Setup Environment
run: |
echo "NEXT_PUBLIC_API_URL=https://shafa-hono-stage-${{ github.event.number }}.radicalplatforms.workers.dev/api" > next/.env.production
- name: Build Cloudflare Next on Pages
run: npm run pages:build
working-directory: next
- name: Deploy Next
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ env.CF_API_TOKEN }}
command: pages deploy .vercel/output/static --project-name ${{ env.PAGES_PROJECT_NAME }} --branch ${{ env.DEPLOY_TAG }}
workingDirectory: next