Skip to content

Update intellij guide #75

Update intellij guide

Update intellij guide #75

Workflow file for this run

#
# Original Action made by @andrewstech (https://github.com/andrewstech)
# and slightly modified by Andre601 (https://github.com/Andre601)
#
# Original Action file:
# https://github.com/blueedgetechno/win11React/blob/master/.github/workflows/PR-Preview.yml
#
name: Pull request Deploy preview
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
paths:
- 'docs/**'
- 'overrides/**'
- 'mkdocs.yml'
- 'requirements.txt'
jobs:
deploy-preview:
name: Create Deploy-Preview
runs-on: ubuntu-latest
steps:
- uses: peter-evans/find-comment@v2
id: find-comment
name: Find Comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: gh-pages-deploy
- uses: peter-evans/create-or-update-comment@v2
id: comment
name: Create initial comment
with:
body: |-
## Deploy Preview
Building preview of Pull request. Please wait...
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
token: ${{ secrets.BOT }}
edit-mode: replace
- uses: actions/checkout@v3
name: Checkout Code
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- uses: actions/setup-python@v4
name: Setup Python
with:
python-version: 3.7
- name: Install depencencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
- name: Build docs
run: mkdocs build
- uses: peaceiris/actions-gh-pages@v3
name: Deploy pages
with:
personal_token: ${{ secrets.BOT }}
publish_dir: ./site
destination_dir: ./${{ github.repository }}/${{ github.event.pull_request.number }}
external_repository: gh-pages-deploy/Deploy-Previews
full_commit_message: 'Pushing deploy preview for Pull request ${{ github.event.pull_request.number }} from ${{ github.repository }}'
- name: Delay comment update by 30 seconds
run: sleep 30s
shell: bash
- uses: peter-evans/create-or-update-comment@v2
name: Update comment.
with:
body: |-
## Deploy Preview
Deploy-Preview complete!
*If you get 404 from the link, wait a few minutes and try again.*
| Name | Link |
| ------ | ------------------------------------------------------------------------------------------------------------------ |
| Commit | ${{ github.event.pull_request.head.sha }} |
| Link | https://gh-pages-deploy.github.io/Deploy-Previews/${{ github.repository }}/${{ github.event.pull_request.number }} |
| Logs | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
comment-id: ${{ steps.comment.outputs.comment-id }}
edit-mode: replace
token: ${{ secrets.BOT }}
- if: ${{ failure() }}
uses: peter-evans/create-or-update-comment@v2
name: Update comment.
with:
body: |-
## Deploy Preview
Deploy-Preview failed!
Please check the below linked Logs for further information.
| Name | Link |
| ------ | -------------------------------------------------------------------------------------------------- |
| Commit | ${{ github.event.pull_request.head.sha }} |
| Logs | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
comment-id: ${{ steps.comment.outputs.comment-id }}
edit-mode: replace
token: ${{ secrets.BOT }}