Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Update README.md

Update README.md #90

Workflow file for this run

name: ci
on:
push:
branches:
- main
jobs:
deploy:
if: github.event_name == 'push'
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.8.0
# - uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # pin@v2
# with:
# path: |
# ~/.npm
# ${{ github.workspace }}/.next/cache
# # Generate a new cache whenever packages or source files change.
# key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{
# hashFiles('**.[jt]s', '**.[jt]sx') }}
# # If source files changed but packages didn't, rebuild from a prior cache.
# restore-keys: |
# ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: install
run: npm ci
- name: prebuild
run: npm run prebuild
- name: build
run: npm run build
- name: deploy
uses: cloudflare/wrangler-action@4c10c1822abba527d820b29e6333e7f5dac2cabd # pin@2.0.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages publish build/ --project-name=ghtrending-birki-io --branch=main --commit-dirty=true
# - name: CDN Purge
# uses: jakejarvis/cloudflare-purge-action@eee6dba0236093358f25bb1581bd615dc8b3d8e3 # pin@v0.3.0
# env:
# CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
# CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_PURGE_TOKEN }}
# PURGE_URLS: '["https://", "https://"]'