Skip to content

[WIP] infra: add some infra #116

[WIP] infra: add some infra

[WIP] infra: add some infra #116

Workflow file for this run

name: Hugo Docs
on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
paths:
- "docs/site/**"
- "tools/make/docs.mk"
permissions:
contents: read
jobs:
docs-build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Git checkout
uses: actions/[email protected]
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}
- uses: ./tools/github-actions/setup-deps
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: "latest"
extended: true
- name: Setup Node
uses: actions/[email protected]
with:
node-version: "18"
- name: Install Site Dependencies and Build Site
run: |
cp docs/api-testing-schema.json docs/site/static/api-testing-schema.json
cp docs/api-testing-mock-schema.json docs/site/static/api-testing-mock-schema.json
make lint.checklinks
make lint.markdown
make docs
# Upload docs for GitHub Pages
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
# Path of the directory containing the static assets.
path: docs/site/public
# Duration after which artifact will expire in days.
# retention-days: # optional, default is 1
# This workflow contains a single job called "build"
docs-publish:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: docs-build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
deployments: write
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 }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]