Skip to content

Commit

Permalink
💚 publish docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelStark committed Oct 20, 2023
1 parent 7f4da23 commit 7970ac9
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 61 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docs

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Zig
uses: korandoru/setup-zig@v1
with:
zig-version: master

- name: Generate docs
run: zig test -femit-docs=./docsite src/lib.zig

- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }} && steps.check_changes.outcome == 'success'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docsite
21 changes: 0 additions & 21 deletions .github/workflows/test copy.yml

This file was deleted.

32 changes: 3 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Docs

on:
push:
Expand All @@ -17,31 +17,5 @@ jobs:
with:
zig-version: master

- name: Build
run: zig build

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Zig
uses: korandoru/setup-zig@v1
with:
zig-version: master

- name: Lint
run: zig fmt --check src/*.zig

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

- name: Set up Zig
uses: korandoru/setup-zig@v1
with:
zig-version: master

- name: Test
run: zig build test --summary all
- name: Generate docs
run: zig test -femit-docs=./docs src/lib.zig
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<p align="center">
<img src="https://github.com/abdelhamidbakhta/cairo-zig/blob/main/docs/kit/logo/starknet-zig-logo.png?raw=true" alt="Logo"/>
<img src="https://github.com/keep-starknet-strange/cairo-zig/blob/main/docs/kit/logo/starknet-zig-logo.png?raw=true" alt="Logo"/>
<h1 align="center">cairo-zig</h1>
</p>

<div align="center">
<br />

[![GitHub Workflow Status](https://github.com/abdelhamidbakhta/cairo-zig/actions/workflows/test.yml/badge.svg)](https://github.com/abdelhamidbakhta/cairo-zig/actions/workflows/test.yml)
[![Project license](https://img.shields.io/github/license/abdelhamidbakhta/cairo-zig.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/abdelhamidbakhta/cairo-zig/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
[![GitHub Workflow Status](https://github.com/keep-starknet-strange/cairo-zig/actions/workflows/test.yml/badge.svg)](https://github.com/keep-starknet-strange/cairo-zig/actions/workflows/test.yml)
[![Project license](https://img.shields.io/github/license/keep-starknet-strange/cairo-zig.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/keep-starknet-strange/cairo-zig/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)

</div>

Expand Down
8 changes: 7 additions & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.{
.name = "cairo",
.version = "0.0.1",
.paths = .{""},
.paths = .{
"src",
"build.zig",
"build.zig.zon",
"LICENSE",
"README.md",
},
.dependencies = .{
.@"zig-cli" = .{
.url = "https://github.com/sam701/zig-cli/archive/ea92821a797bdefb5df41ce602f8c7f387bcfb93.tar.gz",
Expand Down
2 changes: 1 addition & 1 deletion docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ a project may be further defined and clarified by project maintainers.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project maintainer using any of the
[private contact addresses](https://github.com/abdelhamidbakhta/cairo-zig#support).
[private contact addresses](https://github.com/keep-starknet-strange/cairo-zig#support).
All complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. The project team
is obligated to maintain confidentiality with regard to the reporter of an
Expand Down
10 changes: 5 additions & 5 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To set up a development environment, please follow these steps:
1. Clone the repo

```sh
git clone https://github.com/abdelhamidbakhta/cairo-zig
git clone https://github.com/keep-starknet-strange/cairo-zig
cd cairo-zig
cargo test
```
Expand All @@ -26,9 +26,9 @@ To set up a development environment, please follow these steps:

You've found a bug in the source code, a mistake in the documentation or maybe
you'd like a new feature?Take a look at
[GitHub Discussions](https://github.com/abdelhamidbakhta/cairo-zig/discussions)
[GitHub Discussions](https://github.com/keep-starknet-strange/cairo-zig/discussions)
to see if it's already being discussed. You can help us by
[submitting an issue on GitHub](https://github.com/abdelhamidbakhta/cairo-zig/issues).
[submitting an issue on GitHub](https://github.com/keep-starknet-strange/cairo-zig/issues).
Before you create an issue, make sure to search the issue archive -- your issue
may have already been addressed!
Expand All @@ -45,10 +45,10 @@ Please try to create bug reports that are:
### How to submit a Pull Request
1. Search our repository for open or closed
[Pull Requests](https://github.com/abdelhamidbakhta/cairo-zig/pulls) that
[Pull Requests](https://github.com/keep-starknet-strange/cairo-zig/pulls) that
relate to your submission. You don't want to duplicate effort.
2. Fork the project
3. Create your feature branch (`git checkout -b feat/amazing_feature`)
4. Commit your changes (`git commit -m 'feat: add amazing_feature'`)
5. Push to the branch (`git push origin feat/amazing_feature`)
6. [Open a Pull Request](https://github.com/abdelhamidbakhta/cairo-zig/compare?expand=1)
6. [Open a Pull Request](https://github.com/keep-starknet-strange/cairo-zig/compare?expand=1)

0 comments on commit 7970ac9

Please sign in to comment.