woocommerce-rest-api-docs/.github/workflows/deploy.yml
Adrian Moldovan aa5dfd958b
Replace crazy-max/ghaction-github-pages with official GitHub Pages actions
Use actions/upload-pages-artifact and actions/deploy-pages instead of
the third-party crazy-max/ghaction-github-pages action. Also updates
actions/checkout from v2 to v4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:52:16 -06:00

37 lines
777 B
YAML

name: Deploy on push
on:
push:
branches:
- trunk
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
if: github.repository_owner == 'woocommerce'
name: Build and deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: ./build.sh
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4