Skip to content

add composite action #3

add composite action

add composite action #3

Workflow file for this run

name: Upload Docs
on:
push:
branches:
- main
- ci/evm-docs-to-github-pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
build:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
install-nodejs: 'true'
- name: Install Solidity docgen
run: npm install -g solidity-docgen
- name: Create docs directory
run: mkdir -p docs
- name: Build Solidity documentation
run: npx hardhat docgen
- name: Generate Overview Documentation
run: npm run generate-overview-docs
- name: Add YAML front matter for Jekyll
run: |
find docs -name '*.md' -exec sh -c 'sed -i "" "1s/^/---\nlayout: default\n---\n/" "$0"' {} \;
- name: Update Links in Markdown Files to HTML
run: |
find docs -name '*.md' -exec sh -c 'sed -i "" "s/href=\"\([^\"]*\)\.md\([#^\"]*\)\?\"/href=\"\1.html\2\"/g" "$0"' {} \;
- name: Setup Github Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4