From 73d9b544657b8d9bf8fb5d4184c74e71b6adc77a Mon Sep 17 00:00:00 2001 From: Guilherme Dantas Date: Thu, 1 Feb 2024 16:27:19 -0300 Subject: [PATCH] ci: deploy documentation --- .github/workflows/docs.yml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..ec1d7316 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Deploy documentation to GitHub Pages + +on: + push: + branches: ["main"] + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - uses: foundry-rs/foundry-toolchain@v1 + + - name: Install dependencies + run: yarn install + + - name: Generate documentation + run: forge doc -b + + - uses: actions/configure-pages@v4 + + - uses: actions/upload-pages-artifact@v3 + with: + path: docs/book + + - id: deployment + uses: actions/deploy-pages@v4