mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 03:35:51 +00:00
GHA: allow style checker fail; post link to preview
This commit is contained in:
20
.github/workflows/link-checker-pr.yml
vendored
20
.github/workflows/link-checker-pr.yml
vendored
@@ -44,14 +44,6 @@ jobs:
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
cat linkreport.txt
|
||||
|
||||
- name: Comment Broken Links
|
||||
uses: unsplash/comment-on-pr@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
msg: ${{ env.LINKREPORT }}
|
||||
check_for_duplicate_msg: false
|
||||
|
||||
- name: Deploy preview to gh-pages
|
||||
uses: sauloxd/review-apps@v1.3.3
|
||||
with:
|
||||
@@ -60,5 +52,17 @@ jobs:
|
||||
dist: "out"
|
||||
slug: "pr-preview"
|
||||
|
||||
- name: Get short SHA6
|
||||
id: slug
|
||||
run: echo "::set-output name=sha6::$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-6)"
|
||||
|
||||
- name: Run Style Checker
|
||||
continue-on-error: true
|
||||
run: dactyl_style_checker -q
|
||||
|
||||
- name: Summarize Output
|
||||
uses: unsplash/comment-on-pr@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
msg: ${{ env.LINKREPORT }}\n\nPreview: https://${{env.GITHUB_REPOSITORY_OWNER_SLUG}}.github.io/${{env.GITHUB_REPOSITORY_NAME}}/pr-preview/${{steps.branchname.outputs.branch}}/${{steps.slug.outputs.sha6}}
|
||||
|
||||
66
.github/workflows/pr-preview.yaml
vendored
66
.github/workflows/pr-preview.yaml
vendored
@@ -1,66 +0,0 @@
|
||||
name: "Preview PR builds in the gh-pages branch"
|
||||
|
||||
# Temporarily disabled: attempting to roll this into the link-checker-pr job
|
||||
# on:
|
||||
# pull_request:
|
||||
# types: [opened, edited, synchronize]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Dactyl Site
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Python Setup
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: "3.7"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install Jinja2==2.11.3
|
||||
pip install dactyl lxml
|
||||
- name: PR Branch Name
|
||||
uses: mdecoleman/pr-branch-name@1.0.0
|
||||
id: branchname
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: GitHub Environment Variables Action
|
||||
uses: FranzDiebold/github-env-vars-action@v1.2.1
|
||||
- name: Get PR commit trigger SHA
|
||||
uses: bhowell2/github-substring-action@v1.0.0
|
||||
id: prsha
|
||||
with:
|
||||
value: ${{ github.event.pull_request.head.sha }}
|
||||
length_from_start: 6
|
||||
- name: Get short SHA6
|
||||
id: slug
|
||||
env:
|
||||
PRSHA: ${{ steps.prsha.outputs.substring }}
|
||||
run: echo "::set-output name=sha6::$(echo ${PRSHA} | cut -c1-6)"
|
||||
- name: Get PR commit trigger SHA
|
||||
uses: bhowell2/github-substring-action@v1.0.0
|
||||
id: prsha7
|
||||
with:
|
||||
value: ${{ github.event.pull_request.head.sha }}
|
||||
length_from_start: 7
|
||||
- name: Get short SHA7
|
||||
id: slug7
|
||||
env:
|
||||
PRSHA: ${{ steps.prsha7.outputs.substring }}
|
||||
run: echo "::set-output name=sha7::$(echo ${PRSHA} | cut -c1-7)"
|
||||
- name: Build and deploy to gh-pages
|
||||
uses: sauloxd/review-apps@v1.3.3
|
||||
with:
|
||||
build-cmd: "dactyl_build"
|
||||
branch: "gh-pages"
|
||||
dist: "out"
|
||||
slug: "review-apps"
|
||||
- name: Comment URL on PR
|
||||
uses: unsplash/comment-on-pr@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SHA: ${{ github.event.pull_request.head.sha }}
|
||||
with:
|
||||
msg: "https://${{env.GITHUB_REPOSITORY_OWNER_SLUG}}.github.io/${{env.GITHUB_REPOSITORY_NAME}}/review-apps/${{steps.branchname.outputs.branch}}/${{steps.slug.outputs.sha6}}?version=${{steps.slug7.outputs.sha7}}"
|
||||
check_for_duplicate_msg: false
|
||||
Reference in New Issue
Block a user