feat(examples): Datastore package p/jeronimoalbi/datastore
#1344
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
# generate Go docs and publish on gh-pages branch | |
# Live at: https://gnolang.github.io/gno | |
name: GitHub pages (godoc & stdlib_diff) build and deploy | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
jobs: | |
build: | |
if: github.repository == 'gnolang/gno' # Alternatively, validate based on provided tokens and permissions. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
# Use the goroot at the top of the project to compare with the GnoVM | |
# stdlib, rather than the one in stdlib_diff (which may have a go.mod with | |
# a different toolchain version). | |
- run: echo "GOROOT_SAVE=$(go env GOROOT)" >> $GITHUB_ENV | |
- run: "cd misc/stdlib_diff && make gen" | |
- run: "cd misc/gendocs && make install gen" | |
- run: "mkdir -p pages_output/stdlib_diff" | |
- run: | | |
cp -r misc/gendocs/godoc/* pages_output/ | |
cp -r misc/stdlib_diff/stdlib_diff/* pages_output/stdlib_diff/ | |
# These two last steps will be skipped on pull requests | |
- uses: actions/configure-pages@v5 | |
id: pages | |
if: github.event_name != 'pull_request' | |
- uses: actions/upload-pages-artifact@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
path: ./pages_output | |
deploy: | |
if: > | |
github.repository == 'gnolang/gno' && | |
github.ref == 'refs/heads/master' && | |
github.event_name == 'push' | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build | |
steps: | |
- uses: actions/deploy-pages@v4 | |
id: deployment |