From f5ed7ad79c338c087555958fd863c48bbfe557d7 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sun, 1 Sep 2019 00:30:48 +0200 Subject: [PATCH] Add test workflow --- .github/workflows/test.yml | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 7 +++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e4a31f8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: test + +on: + push: + branches: + - master + +jobs: + github-pages: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@master + - + name: Build + run: | + mkdir public + cat > public/index.html < + + + GitHub Pages deployed! + + +

GitHub Pages with ${{ github.sha }} commit ID has been deployed through GitHub Pages action successfully.

+ + + EOL + - + name: Deploy + if: success() + uses: crazy-max/ghaction-github-pages@master + with: + target_branch: gh-pages + build_dir: public + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index de8c49d..fbeca18 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![GitHub release](https://img.shields.io/github/release/crazy-max/ghaction-github-pages.svg?style=flat-square)](https://github.com/crazy-max/ghaction-github-pages/releases/latest) +[![GitHub marketplace](https://img.shields.io/badge/marketplace-github--pages-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/github-pages) +[![Test workflow](https://github.com/crazy-max/ghaction-github-pages/workflows/test/badge.svg)](https://github.com/crazy-max/ghaction-github-pages/actions) [![Support me on Patreon](https://img.shields.io/badge/donate-patreon-f96854.svg?logo=patreon&style=flat-square)](https://www.patreon.com/crazymax) [![Paypal Donate](https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal&style=flat-square)](https://www.paypal.me/crazyws) @@ -9,7 +12,7 @@ A GitHub Action for deploying GitHub Pages ## 🚀 Usage -Below is a simple to deploy to GitHub Pages: +Below is a simple to deploy to GitHub Pages. A [live example](https://github.com/crazy-max/ghaction-github-pages/actions) is also available for this repository. ```yaml name: website @@ -34,7 +37,7 @@ jobs: GitHub Pages deployed! -

GitHub Pages with ${{ github.sha }} commit ID has been deployed through GitHub Pages action successfully.

+

GitHub Pages with ${{ github.sha }} commit ID has been deployed through GitHub Pages action successfully.

EOL