mirror of
https://gh.wpcy.net/https://github.com/woocommerce/woocommerce-rest-api-docs.git
synced 2026-04-25 04:52:16 +08:00
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>
37 lines
777 B
YAML
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
|