Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(pipeline): run build of github pages on pullRequests #3607

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

permissions:
Expand All @@ -26,22 +29,26 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: echo "GOROOT=$(go env GOROOT)" >> $GITHUB_ENV
- run: echo $GOROOT
- 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' }} # Alternatively, validate based on provided tokens and permissions.
if: ${{ github.repository == 'gnolang/gno' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
runs-on: ubuntu-latest
environment:
name: github-pages
Expand Down
2 changes: 1 addition & 1 deletion misc/stdlib_diff/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
all: clean gen

gen:
go run . -src $(GOROOT)/src -dst ../../gnovm/stdlibs -out ./stdlib_diff
go run . -src $(GOROOT_SAVE)/src -dst ../../gnovm/stdlibs -out ./stdlib_diff

clean:
rm -rf stdlib_diff
4 changes: 3 additions & 1 deletion misc/stdlib_diff/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# stdlibs_diff

stdlibs_diff is a tool that generates an html report indicating differences between gno standard libraries and go standrad libraries
stdlibs_diff is a tool that generates an html report indicating differences between gno standard libraries and go standard libraries.

⚠️ When using goenv to set the src or the destination, the Go version will be the one from the toolchain on go.mod.
Copy link
Member

@moul moul Jan 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this comment makes sense, especially as a warning. Isn't it the concept of goenv?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello thanks for your review, maybe It will do more sense as a comment on the gh-pages.yml?

The idea was to mention what Golang version is used for the stdlibs comparaison. This was a need from the issue


## Usage

Expand Down
Loading