ilot-io/README.md

83 lines
2.7 KiB
Markdown
Raw Normal View History

2024-06-18 12:00:41 -04:00
# ilot.io
2024-08-25 22:33:12 -04:00
Upstream: https://forge.ilot.io/ilot/ilot.io
2024-06-14 14:22:59 -04:00
2024-08-25 22:33:12 -04:00
![Build Status](https://forge.ilot.io/ilot/ilot.io/badges/workflows/pages.yaml/badge.svg)
![Push Status](https://forge.ilot.io/ilot/ilot.io/badges/workflows/deploy.yaml/badge.svg)
2024-06-14 14:22:59 -04:00
2024-08-25 22:33:12 -04:00
## Forgejo Actions
2024-06-14 14:22:59 -04:00
2024-08-25 22:33:12 -04:00
This project's static Pages are built by Forgejo Actions, following the steps
defined in [`.forgejo/workflows/pages.yaml`](.forgejo/workflows/pages.yaml).
That builds this website using ikiwiki, and pushes the build artifacts to the
`public` branch.
2024-06-14 14:22:59 -04:00
2024-08-25 22:33:12 -04:00
The `public` branch has its own workflow following steps defined in
[`forgejo/workflows/deploy.yaml`](.forgejo/workflows/deploy.yaml)
that uploads the artifacts to a remote HTTP server for deployment in
production. This workflow is automatically updated from `main` so that `public`
should never be manually modified.
2024-06-14 14:22:59 -04:00
2024-08-25 22:33:12 -04:00
The deployment is done by a simple remote git push via SSH to a non-bare repo
where `git config receive.denyCurrentBranch` is set as `updateInstead`. This
allows this repo to be checked out as `public`, allowing it to be a root for
your favorite HTTP server.
2024-06-14 14:22:59 -04:00
2024-08-25 22:33:12 -04:00
The following secrets are expected to be set for operation:
* PAGES_PRIVKEY: SSH private key that is used to push to the HTTP server's git
repo
* PAGES_TOKEN: Forgejo application token used to push to `public` branch.
The following variables are expected to be set for operation:
* PAGES_TARGET: SSH target for HTTP server's git repo, following this format:
user@example.net:/path/to/http/repo
2024-06-14 14:22:59 -04:00
## Building locally
To work locally with this project, you'll have to follow the steps below:
1. Fork, clone or download this project
2024-06-18 12:00:41 -04:00
1. Install ikiwiki:
* [mac][]
* [linux][]
* [source][]
1. Generate the website: `ikiwiki --setup ikiwiki.setup`
2024-06-18 21:14:15 -04:00
1. Start http-server: `./test-server.sh`
2024-08-25 22:33:12 -04:00
1. Preview your project: open 127.0.0.1:8080 in your browser
2024-06-14 14:22:59 -04:00
Read more at ikiwiki's [documentation][].
2024-06-18 12:00:41 -04:00
## Contributing
1. Fork the main ilot.io repo.
2. Checkout the forked repository.
2024-08-25 22:33:12 -04:00
- `git clone ssh://git@forge.ilot.io/$USER/ilot.io`
2024-06-18 12:00:41 -04:00
- `cd ilot.io`
3. Make your changes.
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
4. Do local build.
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
- `ikiwiki --setup ikiwiki.setup`
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
5. Fix any errors that come up and rebuild until it works locally.
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
6. Commit the changes to the git repo in a git branch
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
- `git checkout -b <name>`
- `git add` changes
- `git commit -m 'content/index: descriptive description'`
- `git push`
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
7. Create a merge request with your changes by following link in server response.
2024-06-14 14:22:59 -04:00
2024-06-18 12:00:41 -04:00
8. Once the tests in the merge-request pass, and reviewers are happy, your changes
will be merged.
2024-06-14 14:22:59 -04:00
[ikiwiki]: https://ikiwiki.info/
2024-06-18 12:00:41 -04:00
[source]: https://ikiwiki.info/install/
[linux]: https://ikiwiki.info/setup/
[mac]: https://ikiwiki.info/tips/ikiwiki_on_mac_os_x/
2024-06-14 14:22:59 -04:00
[documentation]: https://ikiwiki.info/