test: fix tests #77
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
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- preconf-driver-apis | |
jobs: | |
swagger-gen: | |
if: ${{ !contains(github.event.head_commit.message, 'Update Swagger documentation') }} | |
runs-on: [arc-runner-set] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: preconf-driver-apis | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.23" | |
- name: Install swaggo | |
run: | | |
export CGO_ENABLED=0 | |
go install github.com/swaggo/swag/cmd/swag@latest | |
- name: Generate Swagger documentation | |
run: | | |
export CGO_ENABLED=0 | |
cd packages/taiko-client | |
./scripts/gen_swagger_json.sh | |
- name: Commit Swagger docs | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
if ! git diff --quiet; then | |
git commit -m "Update Swagger documentation" | |
git push origin HEAD:${{ github.ref_name }} | |
else | |
echo "No changes to commit" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy: | |
if: ${{ !contains(github.event.head_commit.message, 'Update Swagger documentation') }} | |
runs-on: [arc-runner-set] | |
needs: swagger-gen | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: preconf-driver-apis | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: packages/taiko-client/docs # Set this to where your `index.html` is located | |
publish_branch: gh-pages |