A seamless way to host static files for your repositories directly from your Forgejo CI/CD pipeline.
Simply copy this snippet into your Forgejo Actions workflow. We handle the uploading, so you can focus on building your static assets.
name: Deploy to Forgejo Pages
on:
push:
branches: [master]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Project
run: npm run build
# Or: yarn build / hugo build / ...
- name: Deploy to Forgejo Pages
uses: https://forge.wvffle.net/actions/deploy-page@master
with:
to: https://forgejo.example.com
content: ./dist
Use the CLI to host the Forgejo Pages service locally.
Usage: forgejo-pages --repos-dir <REPOS_DIR> --forge-host <FORGE_HOST>
Options:
-r, --repos-dir <REPOS_DIR> [env: REPOS_DIR=]
-f, --forge-host <FORGE_HOST> [env: FORGE_HOST=]
-h, --help Print help
Deploy Forgejo Pages using Docker Compose with a single configuration file.
Pull the specific Forgejo Pages image.
Configure the Forge host URL.
Mount your repository pages to /repos.
Bind the exposed port 8000 to the host.
services:
forgejo-pages:
image: forge.wvffle.net/wvffle/forgejo-pages
environment:
- FORGE_HOST=https://pages.example.com
volumes:
- ./repos:/repos
ports:
- "8000:8000"
You can view the source code for this action and the hosting infrastructure on Forgejo.
Visit the Forge