strapi-plugin-config-sync/.github/workflows/deploy-docs.yml

41 lines
1011 B
YAML

name: Deploy Docs
on:
workflow_dispatch:
release:
types: [published]
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
# 👇 Build steps
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
- name: Install dependencies
run: cd docs && yarn install --frozen-lockfile --non-interactive
- name: Build
run: cd docs && yarn build
# 👆 Build steps
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
# 👇 Specify build output path
path: docs/build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4