set up new workflow and migrate to .forgejo dir #5
5 changed files with 29 additions and 2 deletions
25
.forgejo/workflows/deploy.yml
Normal file
25
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- uses: pnpm/setup@v1
|
||||||
|
with:
|
||||||
|
version: 11
|
||||||
|
runtime: node@24
|
||||||
|
cache: true
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build
|
||||||
|
- name: Deploy to Netlify
|
||||||
|
run: npx -y netlify-cli deploy --prod --dir=build
|
||||||
|
env:
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
|
@ -17,6 +17,7 @@ Personal website and blog for Benjamin Palko, deployed on Netlify.
|
||||||
|
|
||||||
- **pnpm is the canonical local package manager**.
|
- **pnpm is the canonical local package manager**.
|
||||||
- The GitHub Actions PR gate (`.github/workflows/pr.yml`) runs `pnpm`. Keep both working; document pnpm commands.
|
- The GitHub Actions PR gate (`.github/workflows/pr.yml`) runs `pnpm`. Keep both working; document pnpm commands.
|
||||||
|
- Deploys to Netlify run via Forgejo Actions (`.forgejo/workflows/deploy.yml`) on push to `main`. It needs `NETLIFY_AUTH_TOKEN` and `NETLIFY_SITE_ID` as Forgejo repo secrets.
|
||||||
|
|
||||||
## Scripts (pnpm)
|
## Scripts (pnpm)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,9 @@ See `AGENTS.md` for the full authoring workflow.
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
Netlify deploys the `main` branch automatically. The GitHub Actions PR gate (`.github/workflows/pr.yml`) runs lint, typecheck, tests, and build on every pull request using `pnpm`. Before shipping, verify locally with:
|
The site deploys to Netlify on every push to `main` via a Forgejo Actions workflow (`.forgejo/workflows/deploy.yml`): it installs with pnpm, runs `pnpm build`, and deploys the `build/` directory with `netlify-cli`. Requires `NETLIFY_AUTH_TOKEN` and `NETLIFY_SITE_ID` configured as repository secrets in Forgejo. Netlify's GitHub-app continuous deployment is disabled.
|
||||||
|
|
||||||
|
The GitHub Actions PR gate (`.github/workflows/pr.yml`) runs on the GitHub mirror on every pull request using `pnpm`. Before shipping, verify locally with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm lint && pnpm check && pnpm test && pnpm build
|
pnpm lint && pnpm check && pnpm test && pnpm build
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
[build]
|
[build]
|
||||||
command = "pnpm run build"
|
|
||||||
publish = "build"
|
publish = "build"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue