mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-19 19:25:51 +00:00
Add PR Apps workflow for reviews
Create .nojekyll Delete nojekyll Feedback changes
This commit is contained in:
65
.github/workflows/dactyl.yaml
vendored
Normal file
65
.github/workflows/dactyl.yaml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: "Dactyl build only on PR"
|
||||
|
||||
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-
|
||||
- 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