Skip to content

publish

publish #33

Workflow file for this run

---
name: publish
on:
repository_dispatch:
types:
- on_demand
workflow_run:
workflows:
- test
types:
- completed
branches:
- master
jobs:
publish:
name: Publish to GitHub Pages
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Fetch API documentation
run: |
curl -SsL "https://raw.githubusercontent.com/${ORG}/${REPO}/${BRANCH}/${FILE_PATH}" \
-H "Authorization: token ${GITHUB_TOKEN}" \
-o src/spec/openapi.yaml \
env:
ORG: StatusCakeDev
REPO: openapi
BRANCH: master
FILE_PATH: api/statuscake/service/statuscake/openapi.yaml
GITHUB_TOKEN: ${{ secrets.MACHINE_TOKEN }}
- name: Build website
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build