From 4bba76d3dcd414480b5dd9ea911c61d72ec2e7e3 Mon Sep 17 00:00:00 2001 From: George Lemon Date: Wed, 30 Oct 2024 02:37:00 +0200 Subject: [PATCH] Initial commit --- .github/workflows/docs.yml | 39 ++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 30 +++++++++++++++++++++++++++++ .gitignore | 8 ++++++++ README.md | 30 +++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 README.md diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..eb7b64f --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,39 @@ +name: docs +on: + push: + tags: + - '*.*.*' + # branches: + # - main +env: + nim-version: 'stable' + nim-src: src/${{ github.event.repository.name }}.nim + deploy-dir: .gh-pages +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: jiro4989/setup-nim-action@v1 + with: + nim-version: ${{ env.nim-version }} + - run: nimble install -Y + - run: nim doc --index:on --project --path:. --out:${{ env.deploy-dir }} ${{ env.nim-src }} + + - name: "Rename to index.html" + run: mv ${{ env.deploy-dir }}/${{ github.event.repository.name }}.html ${{ env.deploy-dir }}/index.html + + - name: "Find and replace (index.html)" + run: sed -i 's/${{ github.event.repository.name }}.html/index.html/g' ${{ env.deploy-dir }}/index.html + + # - name: "Find and replace (idx)" + # run: sed -i 's/${{ github.event.repository.name }}.html/index.html/g' ${{ env.deploy-dir }}/${{ github.event.repository.name }}.idx + + - name: "Find and replace (theindex.html)" + run: sed -i 's/${{ github.event.repository.name }}.html/index.html/g' ${{ env.deploy-dir }}/theindex.html + + - name: Deploy documents + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ env.deploy-dir }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2677b42 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: test +on: + push: + paths-ignore: + - LICENSE + - README.* + - examples + - .github/workflows + pull_request: + paths-ignore: + - LICENSE + - README.* + - examples + - .github/workflows +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + nim-version: + - 'stable' + steps: + - uses: actions/checkout@v3 + - uses: jiro4989/setup-nim-action@v1 + with: + nim-version: ${{ matrix.nim-version }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: nimble install -Y + - run: nim c -r src/${{ github.event.repository.name }}.nim + - run: nimble test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b33146d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +nimcache/ +nimblecache/ +htmldocs/ +testresults/ +/tests/* +!/tests/*.nim +!/tests/*.nims diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb45844 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +

+
+ OpenPeeps repository template for developing libraries,
projects and other cool things. 👑 Written in Nim language +

+ +

+ nimble install {PKG} +

+ +

+ API reference
+ Github Actions Github Actions +

+ +## 😍 Key Features +- [x] Open Source | `MIT` License +- [x] Written in Nim language + +## Examples +... + +### ❤ Contributions & Support +- 🐛 Found a bug? [Create a new Issue](/issues) +- 👋 Wanna help? [Fork it!](/fork) +- 😎 [Get €20 in cloud credits from Hetzner](https://hetzner.cloud/?ref=Hm0mYGM9NxZ4) +- 🥰 [Donate via PayPal address](https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C) + +### 🎩 License +{PKG} | MIT license. [Made by Humans from OpenPeeps](https://github.com/openpeeps).
+Copyright © 2023 OpenPeeps & Contributors — All rights reserved.