hardhat: add sepolia #65
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
# Github Workflow to autogenerate docs and push to repository wiki | |
name: Autogenerate docs | |
on: | |
push: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Checkout the wiki repository | |
uses: actions/checkout@v2 | |
with: | |
repository: "${{ github.repository }}.wiki.git" | |
# As of Jul 2021, the default branch of a GitHub wiki is `master`, not `main` | |
ref: master | |
path: wiki | |
- name: Generate the Wiki Page using foundry | |
run: | | |
set -xe | |
forge doc --build --out wiki | |
- name: Configure the GitHub wiki identity | |
working-directory: wiki | |
# "${GITHUB_ACTOR}@users.noreply.github.com" is associated to the actor without real emails | |
run: | | |
set -xe | |
git config user.name "[bot] ${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Update the wiki page | |
working-directory: wiki | |
# --allow-empty may be good enough for almost all the situations, | |
# but maybe you want to do `if git commit ... ; then` if you don't want to record an empty commit | |
run: | | |
set -xe | |
git commit --allow-empty -m "update the wiki page by bot (${GITHUB_WORKFLOW})" | |
git push origin master | |
deploy: | |
needs: build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
# from https://github.com/actions/deploy-pages | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Generate the Wiki Page using foundry | |
run: | | |
set -xe | |
forge doc --build --out wiki | |
# build gh pages using https://github.com/marketplace/actions/upload-github-pages-artifact | |
- name: Upload to GitHub Pages | |
uses: actions/[email protected] | |
with: | |
path: wiki/book/ | |
retention-days: 1 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |