Skip to content

ci: use cloudflare/pages-action instead and add a step to comment URL #359

ci: use cloudflare/pages-action instead and add a step to comment URL

ci: use cloudflare/pages-action instead and add a step to comment URL #359

name: Build and Deploy documentation site
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Endo
uses: actions/checkout@v4
with:
repository: endojs/endo
path: endo
- name: Build Endo docs
run: |
cd endo
yarn install
yarn docs:markdown-for-agoric-documentation-repo
- name: Move Endo docs into main/reference
run: mv endo/api-docs main/reference/endo
- name: Checkout agoric-sdk
uses: actions/checkout@v4
with:
repository: agoric/agoric-sdk
path: agoric-sdk
- name: Build agoric-sdk docs
run: |
cd agoric-sdk
yarn install
yarn build
yarn docs:markdown-for-agoric-documentation-repo
- name: Move agoric-sdk docs into main/reference
run: mv agoric-sdk/api-docs main/reference/agoric-sdk
- name: Build Doc site
run: |
yarn install
yarn docs:build-cf
- name: Publish to Cloudflare Pages
id: publish-to-cloudflare-pages
uses: cloudflare/pages-action@v1
with:
wranglerVersion: '3'
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 0c4635effffcd7f36d1b9f0425a4367a
projectName: documentation
directory: dist/
- name: Comment with preview URL
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body:${{ steps.publish-to-cloudflare-pages.outputs.url }}
})