28 lines
800 B
YAML
28 lines
800 B
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: nix
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build
|
|
run: nix --extra-experimental-features 'nix-command flakes' build
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
run: |
|
|
echo "Token set: ${#CLOUDFLARE_API_TOKEN} chars"
|
|
echo "Account ID set: ${#CLOUDFLARE_ACCOUNT_ID} chars"
|
|
npx --yes wrangler@3 pages deploy result/ \
|
|
--project-name=personal-site \
|
|
--commit-dirty=true > /tmp/wrangler.log 2>&1 \
|
|
|| (cat /tmp/wrangler.log; exit 1)
|
|
cat /tmp/wrangler.log
|