From 5ce6557e4fefea9dfb0549514f9d837ee50a77a1 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 23 May 2020 23:15:35 +0200 Subject: [PATCH] Check availability of GitHub Pages example --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 0a3df5d..efa68d6 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ ___ * [Usage](#usage) * [Workflow](#workflow) * [Sign commits](#sign-commits) + * [Check availability of GitHub Pages](#check-availability-of-github-pages) * [Customizing](#customizing) * [inputs](#inputs) * [environment variables](#environment-variables) @@ -94,6 +95,27 @@ You can use the [Import GPG](https://github.com/crazy-max/ghaction-import-gpg) G GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` +### Check availability of GitHub Pages + +You can use the [GitHub Status](https://github.com/crazy-max/ghaction-github-status) Action along with this check availability of GitHub Pages before deploying: + +```yaml + - + name: Check GitHub Pages status + uses: crazy-max/ghaction-github-status@v1 + with: + pages_threshold: major_outage + - + name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: public + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + ## Customizing ### inputs