diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..eab55d65 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,43 @@ +name: Deploy to GitHub Pages + +on: + release: + types: + - "published" + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Fix anchor tag in README + run: ex -s -c '%s/docs\/getting-started\.md/docs\/getting-started/|x' README.md + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./ + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 703e8246..58676e10 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,6 +45,7 @@ Several GitHub action workflows are executed when pull requests are merged or re * `.github/workflows/build.yml` checks that the project can be built and the tests still pass. * `.github/workflows/codeql.yml` runs static analysis to vet code quality. +* `.github/workflows/gh-pages.yml` deploy the documentation files to GitHub Pages. * `.github/workflows/release.yml` submits a new version to Homebrew when a Git version tag is created. * `.github/workflows/triage.yml` automatically tags old issues and PRs as staled. @@ -58,4 +59,4 @@ Binaries can be created automatically using `make dist-linux` and `make dist-mac Unfortunately, `make dist-macos` must be run manually on both an Apple Silicon and Intel chips. The Linux builds are created using Docker and [these custom images](https://github.com/zk-org/zk-xcompile). -This process is convoluted because `zk` requires CGO with `mattn/go-sqlite3`, which prevents using Go's native cross-compilation. Transitioning to a CGO-free SQLite driver such as [cznic/sqlite](https://gitlab.com/cznic/sqlite) could simplify the distribution process significantly. \ No newline at end of file +This process is convoluted because `zk` requires CGO with `mattn/go-sqlite3`, which prevents using Go's native cross-compilation. Transitioning to a CGO-free SQLite driver such as [cznic/sqlite](https://gitlab.com/cznic/sqlite) could simplify the distribution process significantly. diff --git a/_config.yml b/_config.yml new file mode 100644 index 00000000..82be88b0 --- /dev/null +++ b/_config.yml @@ -0,0 +1,24 @@ +title: "zk" +permalink: /:title +defaults: + - scope: + path: "README.md" + values: + title: "zk" + - scope: + path: "" # all + values: + render_with_liquid: false +exclude: + - ".github/" + - ".gitignore" + - "CHANGELOG.md" + - "CONTRIBUTING.md" + - "LICENSE" + - "Makefile" + - "go.mod" + - "go.sum" + - "internal/" + - "main.go" + - "tests/" + diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 48637e83..00000000 --- a/docs/_config.yml +++ /dev/null @@ -1,2 +0,0 @@ -permalink: /:title -theme: jekyll-theme-modernist \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index f024e775..00000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,57 +0,0 @@ - - -
- - - -{% seo %} - - - - - - - - -{{ site.description | default: site.github.project_tagline }}
- {% endif %} -View the Project on GitHub {{ github_name }}
-