mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
Integrating deploy script into npm workflow
This commit is contained in:
parent
3512d8ef42
commit
541ad779bb
3 changed files with 38 additions and 8 deletions
44
README.md
44
README.md
|
|
@ -4,23 +4,53 @@ a static website.
|
|||
|
||||
Please have a look into it and consider to help writing the Documentation. This is still very much work-in-progress, the more useful material we collect, the better we can later present it! All contributions are very welcome!
|
||||
|
||||
## Usage
|
||||
This website uses [Eleventy](https://www.11ty.dev/) as its static site generator.
|
||||
It's supplied as a dev-dependency in `package.json`.
|
||||
|
||||
Thus, install the dependencies by running
|
||||
## Usage
|
||||
### Local Development
|
||||
If you want to work on the documentation, for example by writing your own articles,
|
||||
the easiest way to do so is to fork the documentation repository and develop locally.
|
||||
|
||||
First, run
|
||||
|
||||
```npm install```
|
||||
|
||||
and then run
|
||||
to install all dependencies (they will be installed only for this project, not globally).
|
||||
You only have to do this once.
|
||||
|
||||
Then run
|
||||
|
||||
```npm run serve```
|
||||
|
||||
to have a look at the website or
|
||||
to start a development web server that by default is listening at `http://localhost:8080`.
|
||||
|
||||
Now you can simply change, add or remove files, save them and the development server
|
||||
should automatically reload all changed pages using the amazing Browsersync.
|
||||
|
||||
When you're done, commit your changes to your fork and write a pull request for
|
||||
Codeberg/Documentation. We're happy about every contribution!
|
||||
|
||||
### Build & Deployment
|
||||
Like for local development, before building and deploying you first have to install
|
||||
the dependencies (once):
|
||||
|
||||
```npm install```
|
||||
|
||||
To build the entire website to the `_site` directory run
|
||||
|
||||
```npm run build```
|
||||
|
||||
to build the website to `_site`.
|
||||
Instead, to directly publish the page to Codeberg pages, you can also run
|
||||
|
||||
```npm run deploy```
|
||||
|
||||
which includes a call to `npm run build`.
|
||||
|
||||
### Technical Information
|
||||
This website uses [Eleventy](https://www.11ty.dev/), a static site generator.
|
||||
|
||||
It's supplied as a dev-dependency in `package.json` and its dependencies are locked
|
||||
with `package-lock.json` to try to ensure reproducible builds.
|
||||
|
||||
|
||||
## License and Contributors
|
||||
This website (excluding bundled fonts) is licensed under CC BY-SA 4.0. See the [LICENSE](LICENSE.md) file for details.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
rm -rf pages.git
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rm -r _site/ && eleventy",
|
||||
"deploy": "./deploy.sh",
|
||||
"serve": "eleventy --serve"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue