-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
71 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Deploy PR Preview | ||
# Only run when a PR have the 'preview' label | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
|
||
concurrency: preview-${{ github.ref }} | ||
|
||
jobs: | ||
build-and-deploy-preview: | ||
if: github.event.label.name == 'preview' | ||
runs-on: ubuntu-latest | ||
container: sphinxdoc/sphinx | ||
steps: | ||
- name: Install git 🔧 | ||
shell: bash | ||
run: | | ||
apt-get update | ||
apt-get install -y git | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install 🔧 | ||
shell: bash | ||
run: | | ||
apt-get install -y graphviz rsync | ||
pip3 install -r requirements.txt | ||
- name: Build 🛠 | ||
shell: bash | ||
run: ./scripts/build.sh | ||
|
||
- name: Deploy preview 🚀 | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
preview-branch: gh-pages | ||
umbrella-dir: pr-preview | ||
custom-url: developer.concordium.software | ||
source-dir: ./build | ||
action: deploy |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Remove PR Preview | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed # This hook is needed to remove the preview when PR is closed. | ||
|
||
jobs: | ||
remove-preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Remove preview | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
preview-branch: gh-pages | ||
umbrella-dir: pr-preview | ||
source-dir: ./build | ||
action: remove | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Tell crawlers to ignore PR preview builds. | ||
User-agent: * | ||
Disallow: /pr-preview/ |
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