Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docsite rewrite #105

Merged
merged 24 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
28 changes: 0 additions & 28 deletions .github/workflows/deploy-doc.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
push:
branches:
- source

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- run: npm install

- run: npm run lint

- name: npm run deploy
run: |
git config --global user.email "trygve-lie@users.noreply.github.com"
git config --global user.name "trygve-lie"
echo "machine github.com login trygve-lie password ${{ secrets.GIT_TOKEN }}" > ~/.netrc
npm run deploy
env:
CI: true
GIT_USER: trygve-lie
DEPLOYMENT_BRANCH: main
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test

on:
pull_request:
branches:
- source

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- run: npm install

- run: npm run lint

- run: npm run build
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock=false
save-exact=true
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing

Thank you for showing an interest in contributing to Eik 🧡

If you change the URL of a page, please add a redirect rule to `docusaurus.config.js`.

PRs should target the `source` branch. The `main` branch is where the built website is deployed from.
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
# Website
# eik.dev

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
This repo holds the code and docs for the documentation website at [eik.dev](https://eik.dev/).
It is built using [Docusaurus](https://docusaurus.io/).

### Installation
## Commands

```
npm install
```
All commands are run from the root of the project.

### Local Development

```
npm start
```

This command starts a local development server. Most changes are reflected live without having to restart the server.

### Build

```
npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Handled by GitHub Actions on merge to the `source` branch.
| Command | Action |
| :----------------- | :-------------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:8080` |
| `npm run build` | Build your production site to `./build/` |
| `npm start` | Preview your build locally at `localhost:8080` |
| `npm run deploy` | Run by GitHub Actions to deploy to GitHub Pages |
| `npm run lint` | Run ESLint + Prettier |
| `npm run lint:fix` | Fix ESLint and Prettier issues that are autofixable |
21 changes: 0 additions & 21 deletions docs/ci.md

This file was deleted.

Loading