ayakael.net/README.md

83 lines
2.8 KiB
Markdown
Raw Normal View History

2024-08-26 00:31:48 +00:00
# ayakael.net
Upstream: https://ayakael.net/forge/ayakael.net/actions
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
![Build Status](https://ayakael.net/forge/ayakael.net/badges/workflows/pages.yaml/badge.svg)
![Push Status](https://ayakael.net/forge/ayakael.net/badges/workflows/push.yaml/badge.svg)
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
## Forgejo Actions
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00: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.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
The `public` branch has its own workflow following steps defined in
[`forgejo/workflows/push.yaml`](https://ayakael.net/forge/ayakael.net/src/branch/public/.forgejo/workflows/push.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.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00: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.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00: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.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
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
2016-07-07 08:17:30 +00:00
2016-07-07 06:39:45 +00: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-08-26 00:31:48 +00:00
1. Install ikiwiki:
* [mac][]
* [linux][]
* [source][]
1. Generate the website: `ikiwiki --setup ikiwiki.setup`
1. Start http-server: `./test-server.sh`
1. Preview your project: open 127.0.0.1:8080 in your browser
2016-07-07 06:39:45 +00:00
Read more at ikiwiki's [documentation][].
2024-08-26 00:31:48 +00:00
## Contributing
1. Fork the main ayakael.net repo.
2. Checkout the forked repository.
- `git clone ssh://git@ayakael.net/$USER/ayakael.net`
- `cd ayakael.net`
3. Make your changes.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
4. Do local build.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
- `ikiwiki --setup ikiwiki.setup`
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
5. Fix any errors that come up and rebuild until it works locally.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
6. Commit the changes to the git repo in a git branch
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
- `git checkout -b <name>`
- `git add` changes
- `git commit -m 'content/index: descriptive description'`
- `git push`
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
7. Create a merge request with your changes by following link in server response.
2016-07-07 06:39:45 +00:00
2024-08-26 00:31:48 +00:00
8. Once the tests in the merge-request pass, and reviewers are happy, your changes
will be merged.
2016-07-07 06:39:45 +00:00
[ikiwiki]: https://ikiwiki.info/
2024-08-26 00:31:48 +00:00
[source]: https://ikiwiki.info/install/
[linux]: https://ikiwiki.info/setup/
[mac]: https://ikiwiki.info/tips/ikiwiki_on_mac_os_x/
2016-07-07 06:39:45 +00:00
[documentation]: https://ikiwiki.info/