👷 fix gh pages ci environment #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
generate-config-schema: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python environment | |
uses: ./.github/actions/setup-python | |
- name: Generate | |
id: generate-schema | |
uses: ./.github/actions/generate-schema | |
with: | |
output-path: operagents/config/operagents.schema.json | |
- name: Upload | |
uses: actions/upload-artifact@v2 | |
with: | |
name: operagents-config-schema | |
path: operagents/config/operagents.schema.json | |
retention-days: 1 | |
if-no-files-found: error | |
build: | |
runs-on: ubuntu-latest | |
needs: generate-config-schema | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
fetch-depth: 1 | |
- name: Download Schema | |
uses: actions/download-artifact@v2 | |
with: | |
name: operagents-config-schema | |
path: schemas/ | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: . | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ github.event_name == 'push' }} | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy GitHub Pages site | |
id: deployment | |
uses: actions/deploy-pages@v4 |