-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f7b6b9b
Showing
40 changed files
with
4,992 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Change this to your default branch if it's not 'main' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22' # Use the appropriate version of Go | ||
|
||
- name: Build Go project | ||
run: | | ||
go build -o docute . | ||
- name: Run Go executable | ||
run: | | ||
cd docs | ||
../docute generate --base="/docute/" | ||
- name: Setup Node.js (for Git commands) | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Deploy to gh-pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
# Configure git | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
if git show-ref --quiet refs/heads/gh-pages; then | ||
git checkout gh-pages | ||
else | ||
git checkout --orphan gh-pages | ||
fi | ||
# Copy new content to the gh-pages branch | ||
cp -r docs/.out/* . | ||
git add . | ||
git commit -m "Deploy to gh-pages" | ||
git push origin gh-pages --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
out | ||
jackal | ||
.idea | ||
docs/.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
install: | ||
@ go install . | ||
|
||
generate: | ||
cd docs && docute generate | ||
|
||
host: install generate | ||
cd docs && docute host | ||
|
||
|
||
|
||
format-tools: | ||
go install mvdan.cc/gofumpt@v0.6.0 | ||
gofumpt -l -w . | ||
|
||
lint: format-tools | ||
golangci-lint run | ||
|
||
.PHONY: host install generate format-tools lint |
Oops, something went wrong.