foomo-docs/.github/workflows/publish.yml
2025-09-18 13:41:25 +02:00

53 lines
1.1 KiB
YAML

# https://docusaurus.io/docs/deployment#triggering-deployment-with-github-actions
name: publish
on:
push:
branches: [main]
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v5
with:
node-version: "20.x"
cache: yarn
cache-dependency-path: foomo/yarn.lock
- name: Enable Corepack
run: corepack enable
- name: Release to GitHub Pages
working-directory: foomo
run: |
yarn install --frozen-lockfile
npm run build
- uses: actions/upload-pages-artifact@v3
with:
path: foomo/build
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4