Skip to content

Fix Implementing_FreeIPA_in_a_mixed_Environment #32

Fix Implementing_FreeIPA_in_a_mixed_Environment

Fix Implementing_FreeIPA_in_a_mixed_Environment #32

Workflow file for this run

name: Deploy docs to preview
on:
pull_request_target:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Comment on PR
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "Starting deployment of preview ⏳..."
- uses: actions/checkout@v3
- name: Checkout PR head
run: |
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr
git checkout pr
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build pages
run: make html
- name: Set PR preview path ENVVAR
run: |
echo "PR_PATH=pull/${{github.event.number}}" >> $GITHUB_ENV
- name: Set base URL for preview
run: |
echo "BASE_URL=https://freeipa.github.io/${{ env.PR_PATH}}/" >> $GITHUB_ENV
- name: Deploy to preview
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html/
destination_dir: ${{ env.PR_PATH }}
- name: Update PR preview comment
uses: hasura/comment-progress@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: |
A preview of ${{ github.event.pull_request.head.sha }} is uploaded and can be seen here:
🚀 ${{ env.BASE_URL }} 🚀
Please note that it may take a moment for the latest changes to be reflected.
- name: Update PR comment if job failed
uses: hasura/comment-progress@v2
if: failure()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "Something failed! Please check the action log for details."