-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from hofstadter-io/docs-ci
hof/docs: ci work
- Loading branch information
Showing
48 changed files
with
494 additions
and
213 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 |
---|---|---|
|
@@ -8,6 +8,14 @@ jobs: | |
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: |- | ||
mkdir tmp | ||
cd tmp | ||
wget https://github.com/cue-lang/cue/releases/download/v0.5.0-beta.5/cue_v0.5.0-beta.5_linux_amd64.tar.gz -O cue.tar.gz | ||
tar -xf cue.tar.gz | ||
sudo mv cue /usr/local/bin/cue | ||
cd ../ | ||
rm -rf tmp | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
|
@@ -39,18 +47,16 @@ jobs: | |
- name: Build hof | ||
run: go install ./cmd/hof | ||
- name: Setup | ||
run: "cd docs\nmake first " | ||
- name: Test | ||
run: |- | ||
cd docs | ||
make test | ||
- name: Build | ||
run: |- | ||
hof fmt start [email protected] | ||
cd docs | ||
make build | ||
- name: Check | ||
hof mod link | ||
make deps | ||
- name: Test | ||
run: |- | ||
cd docs | ||
make gen | ||
make test | ||
make run & | ||
make broken-link | ||
strategy: {} | ||
|
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 |
---|---|---|
|
@@ -2,11 +2,43 @@ name: release (docs) | |
"on": | ||
push: | ||
tags: | ||
- docs-* | ||
- docs-** | ||
workflow_dispatch: | ||
inputs: | ||
deploy: | ||
description: where to deploy | ||
required: true | ||
default: next | ||
type: choice | ||
options: | ||
- next | ||
- prod | ||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
environment: hof docs | ||
steps: | ||
- run: |- | ||
mkdir tmp | ||
cd tmp | ||
wget https://github.com/cue-lang/cue/releases/download/v0.5.0-beta.5/cue_v0.5.0-beta.5_linux_amd64.tar.gz -O cue.tar.gz | ||
tar -xf cue.tar.gz | ||
sudo mv cue /usr/local/bin/cue | ||
cd ../ | ||
rm -rf tmp | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.20.x | ||
- uses: actions/cache@v3 | ||
with: | ||
path: |- | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
~/Library/Caches/go-build | ||
~\AppData\Local\go-build | ||
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go-${{ matrix.go-version }}- | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Setup Vars | ||
|
@@ -20,7 +52,34 @@ jobs: | |
fi | ||
echo "HOF_SHA=${SHA}" >> $GITHUB_ENV | ||
echo "HOF_TAG=${TAG}" >> $GITHUB_ENV | ||
- name: Setup | ||
- name: Fetch Go deps | ||
run: go mod download | ||
- name: Build hof | ||
run: go install ./cmd/hof | ||
- name: Setup | ||
run: |- | ||
hof fmt start [email protected] | ||
cd docs | ||
hof mod link | ||
make deps | ||
- name: Build | ||
run: |- | ||
cd docs | ||
make gen | ||
make hugo.next | ||
- name: GCloud Auth | ||
uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: ${{ secrets.HOF_GCLOUD_JSON }} | ||
- name: GCloud Setup | ||
uses: google-github-actions/setup-gcloud@v1 | ||
- name: Docker Auth | ||
run: gcloud auth configure-docker | ||
- name: Image | ||
run: |- | ||
cd docs | ||
make docker | ||
make push | ||
make deploy.next.view | ||
strategy: {} | ||
services: {} |
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 |
---|---|---|
|
@@ -24,6 +24,21 @@ Steps: { | |
""" | ||
} | ||
|
||
cue: { | ||
install: { | ||
#ver: string | *"v0.5.0-beta.5" | ||
run: """ | ||
mkdir tmp | ||
cd tmp | ||
wget https://github.com/cue-lang/cue/releases/download/\(#ver)/cue_\(#ver)_linux_amd64.tar.gz -O cue.tar.gz | ||
tar -xf cue.tar.gz | ||
sudo mv cue /usr/local/bin/cue | ||
cd ../ | ||
rm -rf tmp | ||
""" | ||
} | ||
} | ||
|
||
go: { | ||
setup: { | ||
#ver: string | *(string & Versions.go) | ||
|
@@ -110,5 +125,45 @@ Steps: { | |
|
||
} | ||
} | ||
|
||
gcloud: { | ||
auth: { | ||
name: "GCloud Auth" | ||
uses: "google-github-actions/auth@v1" | ||
with: credentials_json: "${{ secrets.HOF_GCLOUD_JSON }}" | ||
} | ||
setup: { | ||
name: "GCloud Setup" | ||
uses: "google-github-actions/setup-gcloud@v1" | ||
} | ||
|
||
dockerAuth: { | ||
name: "Docker Auth" | ||
run: """ | ||
gcloud auth configure-docker | ||
""" | ||
} | ||
} | ||
|
||
hof: { | ||
install: { | ||
name: "Build hof" | ||
run: "go install ./cmd/hof" | ||
} | ||
} | ||
|
||
docs: { | ||
|
||
setup: { | ||
name: "Setup" | ||
run: """ | ||
hof fmt start [email protected] | ||
cd docs | ||
hof mod link | ||
make deps | ||
""" | ||
} | ||
|
||
} | ||
} | ||
|
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
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
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
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
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
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,5 @@ | ||
gen: | ||
make -C first-example gen | ||
|
||
test: | ||
make -C first-example test |
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
Oops, something went wrong.