Files
TCP-IP-NetworkNote/.github/workflows/deploy.yml

40 lines
964 B
YAML

name: Deploy to Cloudflare Pages
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install --no-fund --no-audit
working-directory: site
env:
NODE_OPTIONS: '--max-old-space-size=4096'
- name: Build site
run: npm run build
working-directory: site
env:
NODE_OPTIONS: '--max-old-space-size=4096'
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy .vitepress/dist --project-name=tcp-ip-notes
workingDirectory: site