Update Extra-data to 1.18 #26
Workflow file for this run
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: Docs - PR | |
on: | |
pull_request: | |
env: | |
GIT_COMMITTER_NAME: github-actions[bot] | |
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com | |
GIT_AUTHOR_NAME: github-actions[bot] | |
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com | |
concurrency: | |
group: "pages-pr--${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/setup | |
with: | |
python-version: 3.8 | |
- run: poetry run poe docs build | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./site | |
deploy: | |
# This can't work on PRs made from forks (no permission to push) | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
needs: build-and-upload | |
permissions: | |
contents: write | |
concurrency: | |
group: deploy | |
cancel-in-progress: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- uses: actions/download-artifact@v4 | |
- name: Add/Update Preview | |
run: | | |
mkdir -p pr | |
rm -rf pr/${{ github.event.number }} | |
mv artifact pr/${{ github.event.number }} | |
- name: Commit and Push | |
run: | | |
git add --all pr/${{ github.event.number }} | |
git clean -fdx | |
git commit \ | |
-m "Preview for PR#${{ github.event.number }}" \ | |
-m "${{ github.event.pull_request.head.sha }}" | |
git push | |
comment: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
env: | |
url: https://${{ github.repository_owner }}.github.io/${{github.event.repository.name}}/pr/${{ github.event.number }} | |
needs: deploy | |
steps: | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
message: | | |
View preview here - ${{ env.url }} (build for ${{ github.event.pull_request.head.sha }}) |