Skip to content

Commit

Permalink
new: Publish docs to GitHub pages. (#93)
Browse files Browse the repository at this point in the history
* Add workflow.

* Update links.

* Rename repo.

* Bump versions.

* Use an action.

* Rename workflow.

* Polish.
  • Loading branch information
milesj authored May 15, 2022
1 parent b327490 commit 0b866e6
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 63 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Docs
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
- run: yarn install --immutable
- run: yarn workspace website run build
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
allow_empty_commit: true
37 changes: 0 additions & 37 deletions .github/workflows/node.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR
on:
pull_request:
jobs:
version:
name: Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- run: yarn version check
8 changes: 8 additions & 0 deletions .yarn/versions/addf0c27.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
releases:
"@moonrepo/cli": patch
"@moonrepo/core-linux-x64-gnu": patch
"@moonrepo/core-linux-x64-musl": patch
"@moonrepo/core-macos-x64": patch
"@moonrepo/core-windows-x64-msvc": patch
"@moonrepo/runtime": patch
website: patch
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ moon is a repository *m*anagement, *o*rganization, *o*rchestration, and *n*otifi
JavaScript based projects, written in Rust. Many of the concepts within moon are heavily inspired
from Bazel and other popular build systems, but tailored for the JavaScript ecosystem.

- [Documentation](./docs/README.md)
- [Documentation](https://moonrepo.dev)

## Contributing

Moon is built on Rust and requires `rustup` and `cargo` to exist in your environment. You can [install Rust from the official website](https://www.rust-lang.org/tools/install).
Moon is built on Rust and requires `rustup` and `cargo` to exist in your environment. You can
[install Rust from the official website](https://www.rust-lang.org/tools/install).

We also require additional Cargo commands, which can be installed with the following.

Expand All @@ -19,9 +20,10 @@ cargo install --force cargo-make
cargo install --force cargo-insta
```

To streamline development, we utilize [cargo-make](https://github.com/sagiegurari/cargo-make) for common tasks.
To streamline development, we utilize [cargo-make](https://github.com/sagiegurari/cargo-make) for
common tasks.

- `cargo make build` - Builds all crates into a single `moon` binary.
- `cargo make format` - Formats code.
- `cargo make lint` - Runs the linter (clippy).
- `cargo make test` - Runs unit and integration tests. Also sets up the moon toolchain.
- `cargo make test` - Runs unit and integration tests. Also sets up the moon toolchain.
25 changes: 19 additions & 6 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 0.1.0

- [ ] website
- [ ] getting started
- [x] website
- [x] getting started

## Targets

Expand Down Expand Up @@ -88,20 +88,32 @@
## Cache

- [x] add a `--no-cache` option to disable all caching
- [ ] hashing
- [x] hashing
- [x] use `stdin` for commands that take long arguments
- [x] dont load `package.json`/`tsconfig.json` so much
- [x] delete old hashes when the hash changes
- [ ] ignore hashes for files that are gitignored
- [x] include local file changes in hash

# 0.2.0

## Cache

- [ ] hashing
- [ ] ignore hashes for files that are gitignored
- [ ] add docs on caching options

## Tests

- [ ] add code coverage reports in CI
- [ ] increase code coverage and add more integration tests

## Targets

- [ ] macos arm/m1
- [ ] linux x64 (musl)

# Backlog

## Tasks

- [ ] Add `@cache` token
Expand All @@ -117,6 +129,7 @@
- [ ] `graph`
- [ ] Spin up an interactive website with full project/task data

# 0.3.0
## Node.js

- new website
- [ ] Add chrome profiling support to spawned processes
- [ ] Publish npm packages
2 changes: 1 addition & 1 deletion crates/config/src/project/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn validate_tasks(map: &HashMap<String, TaskConfig>) -> Result<(), ValidationErr
Ok(())
}

/// https://moonrepo.dev/docs/config/global-project
/// Docs: https://moonrepo.dev/docs/config/global-project
#[derive(Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize, Validate)]
#[serde(rename_all = "camelCase")]
pub struct GlobalProjectConfig {
Expand Down
2 changes: 1 addition & 1 deletion crates/config/src/project/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub struct ProjectWorkspaceConfig {
pub inherited_tasks: ProjectWorkspaceInheritedTasksConfig,
}

/// https://moonrepo.dev/docs/config/project
/// Docs: https://moonrepo.dev/docs/config/project
#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize, Validate)]
#[serde(rename_all = "camelCase")]
pub struct ProjectConfig {
Expand Down
2 changes: 1 addition & 1 deletion crates/config/src/workspace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn validate_projects(projects: &HashMap<String, FilePath>) -> Result<(), Validat
Ok(())
}

/// https://moonrepo.dev/docs/config/workspace
/// Docs: https://moonrepo.dev/docs/config/workspace
#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize, Validate)]
pub struct WorkspaceConfig {
#[serde(default)]
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/milesj/moon",
"url": "https://github.com/moonrepo/moon",
"directory": "packages/cli"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/milesj/moon",
"url": "https://github.com/moonrepo/moon",
"directory": "packages/core-linux-x64-gnu"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-linux-x64-musl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/milesj/moon",
"url": "https://github.com/moonrepo/moon",
"directory": "packages/core-linux-x64-musl"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-macos-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/milesj/moon",
"url": "https://github.com/moonrepo/moon",
"directory": "packages/core-macos-x64"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-windows-x64-msvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/milesj/moon",
"url": "https://github.com/moonrepo/moon",
"directory": "packages/core-windows-x64-msvc"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"types": "./dts/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/milesj/moon",
"url": "https://github.com/moonrepo/moon",
"directory": "packages/runtime"
},
"files": [
Expand Down
14 changes: 8 additions & 6 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ const config = {
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.svg',
organizationName: 'milesj',
organizationName: 'moonrepo',
projectName: 'moon',
deploymentBranch: 'gh-pages',
trailingSlash: false,

presets: [
[
Expand All @@ -23,13 +25,13 @@ const config = {
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/milesj/moon/tree/master/website',
editUrl: 'https://github.com/moonrepo/moon/tree/master/website',
},
// blog: {
// showReadingTime: true,
// // Please change this to your repo.
// editUrl:
// 'https://github.com/milesj/moon/tree/master/website',
// 'https://github.com/moonrepo/moon/tree/master/website',
// },
theme: {
customCss: [
Expand Down Expand Up @@ -90,11 +92,11 @@ const config = {
items: [
{
label: 'Releases',
to: 'https://github.com/milesj/moon/releases',
to: 'https://github.com/moonrepo/moon/releases',
},
{
label: 'Discussions',
to: 'https://github.com/milesj/moon/discussions',
to: 'https://github.com/moonrepo/moon/discussions',
},
],
},
Expand All @@ -103,7 +105,7 @@ const config = {
items: [
{
label: 'GitHub',
to: 'https://github.com/milesj/moon',
to: 'https://github.com/moonrepo/moon',
},
{
label: 'Discord',
Expand Down
2 changes: 1 addition & 1 deletion website/src/theme/Footer/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function FooterLayout({ style, links, logo, copyright }) {
</Text>

<div className="flex space-x-2">
<Link href="https://github.com/milesj/moon">
<Link href="https://github.com/moonrepo/moon">
<span className="sr-only">GitHub</span>
<Icon icon={faGithub} />
</Link>
Expand Down

0 comments on commit 0b866e6

Please sign in to comment.