From 203e6cb74c39e85839a7b3bfb9cb1f5d3739d655 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 31 Aug 2019 22:23:41 +0200 Subject: [PATCH] Initial version --- .dockerignore | 1 + .gitignore | 3 ++ .res/patreon.png | Bin 0 -> 3918 bytes .res/paypal-donate.png | Bin 0 -> 7643 bytes Dockerfile | 14 ++++++++ LICENSE | 21 +++++++++++ README.md | 79 +++++++++++++++++++++++++++++++++++++++++ action.yml | 20 +++++++++++ entrypoint.sh | 42 ++++++++++++++++++++++ 9 files changed, 180 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 .res/patreon.png create mode 100644 .res/paypal-donate.png create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 action.yml create mode 100644 entrypoint.sh diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..26f5c15 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.github diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e49040 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Jetbrains +/.idea +/*.iml diff --git a/.res/patreon.png b/.res/patreon.png new file mode 100644 index 0000000000000000000000000000000000000000..6848a1fc96934e073c63106c3ba0746278a01f8a GIT binary patch literal 3918 zcmV-U53%rxP)30=H7SEYE^JV-t{s;4MzRiCyUmZCpD6-7Bj+2EovM7-VVV8jHAP@wi1QbxV zAyJe~L3RNFkxd0zf`DN&AYIip_jjwSy8Cs%m%NvTEOejqJCN?`s@v7Sx^?T`Tm6cv zs;Y|OFuk(kv4&x#z0VBjSLYOWKSgLJxCE6V#Y2Saaqkqk2u^~V*?1c{F?n?5ANQ2M zQqo-f)cFqZFey?*0B-Ikj)JQ>2|ahz8-Hmmd$!(5HF1iL4;NeoXJZLX7anga?RlUB z2$~{As{zh}yCFhP8eRE^#D5im z>h@#^i@QIWUp=q=OF7ftRASjIB~~m@;=Sq0nKWEEgL=1nho$J)0GEp#9fe7x!k7Q?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8REGbWX|+JIZC?*P z_^=8P2Apwm4_|JG|2|gjZ${7``a^%{5B;G(^oRb?AO9D}{{X)j)|T?s51ar1002ov JPDHLkV1mzqba4Ox literal 0 HcmV?d00001 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5eba377 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine/git:latest + +# https://help.github.com/en/articles/metadata-syntax-for-github-actions#about-yaml-syntax-for-github-actions +LABEL version="0.1.0" \ + repository="https://github.com/crazy-max/ghaction-github-pages" \ + homepage="https://github.com/crazy-max/ghaction-github-pages" \ + maintainer="CrazyMax" \ + "com.github.actions.name"="GitHub Pages" \ + "com.github.actions.description"="Github Action for deploying Github Pages" \ + "com.github.actions.icon"="package" \ + "com.github.actions.color"="green" + +COPY entrypoint.sh LICENSE README.md / +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..89a92d2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 CrazyMax + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..cfc5beb --- /dev/null +++ b/README.md @@ -0,0 +1,79 @@ +[![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) + +## ✨ About + +A GitHub Action for deploying GitHub Pages + +> **:warning: Note:** To use this action, you must have access to the [GitHub Actions](https://github.com/features/actions) feature. GitHub Actions are currently only available in public beta. You can [apply for the GitHub Actions beta here](https://github.com/features/actions/signup/). + +## 🚀 Usage + +Below is a simple to deploy to GitHub Pages: + +```yaml +name: website + +on: push + +jobs: + publish: + 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 + uses: crazy-max/ghaction-github-pages@master + with: + build_dir: public + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +``` + +## 💅 Customizing + +### inputs + +The following are **required** as `step.with` keys + +| Name | Type | Description | +|-------------|---------|-----------------------------------------------------------------| +| `build_dir` | String | Path to build directory to deploy | + +### environment variables + +The following are *required* as `step.env` keys + +| Name | Description | +|----------------|--------------------------------------| +| `GITHUB_TOKEN` | GITHUB_TOKEN as provided by `secrets`| + +## 🤝 How can I help ? + +All kinds of contributions are welcome :raised_hands:!
+The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:
+But we're not gonna lie to each other, I'd rather you buy me a beer or two :beers:! + +[![Support me on Patreon](.res/patreon.png)](https://www.patreon.com/crazymax) +[![Paypal Donate](.res/paypal-donate.png)](https://www.paypal.me/crazyws) + +## 📝 License + +MIT. See `LICENSE` for more details. diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..a29773c --- /dev/null +++ b/action.yml @@ -0,0 +1,20 @@ +# https://help.github.com/en/articles/metadata-syntax-for-github-actions +name: 'GitHub Pages' +description: 'GitHub Action for deploying GitHub Pages' +author: 'crazy-max' +branding: + color: 'green' + icon: 'git-branch' + +inputs: + build_dir: + description: 'Path to build directory to deploy' + required: true + +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.build_dir }} + env: + GITHUB_TOKEN: 'As provided by GitHub Actions' diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..8c2e234 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/sh +set -e + +BUILD_DIR=$1 +if [ ! -d "$BUILD_DIR" ]; then + echo "⛔️ Build dir does not exist" + exit 1 +fi +echo "cd $BUILD_DIR" +cd "$BUILD_DIR" + +REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" +OWNER="$(echo $GITHUB_REPOSITORY | cut -d'/' -f 1)" +REPONAME="$(echo $GITHUB_REPOSITORY | cut -d'/' -f 2)" +PAGES_REPO="${OWNER}.github.io" + +if [[ "$REPONAME" == "$PAGES_REPO" ]]; then + TARGET_BRANCH="master" +else + TARGET_BRANCH="gh-pages" +fi + +: "${REMOTE_BRANCH:=$TARGET_BRANCH}" + +git init +git config user.name "${GITHUB_ACTOR}" +git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + +if [ -z "$(git status --porcelain)" ]; then + echo "⚠️ Nothing to publish" + exit 0 +fi + +git remote rm origin || true +git remote add origin "${REPO}" +git add . +git commit --allow-empty -m 'Deploy to GitHub pages' +git push --force --quiet "$REPO" $REMOTE_BRANCH +rm -rf .git + +cd "$GITHUB_WORKSPACE" +echo "🎉 Content of $BUILD_DIR has been deployed to GitHub Pages."