From 8bbf1a922841a64b70265b5bc81d2bd530d54db1 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Sun, 25 Aug 2019 07:45:45 +0200 Subject: [PATCH] ci: remove leftover docs action --- .github/actions/docs/Dockerfile | 11 ------ .github/actions/docs/src/entrypoint.sh | 54 -------------------------- 2 files changed, 65 deletions(-) delete mode 100644 .github/actions/docs/Dockerfile delete mode 100755 .github/actions/docs/src/entrypoint.sh diff --git a/.github/actions/docs/Dockerfile b/.github/actions/docs/Dockerfile deleted file mode 100644 index 458771951..000000000 --- a/.github/actions/docs/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM node:12-slim - -LABEL com.github.actions.name="Docs" -LABEL com.github.actions.description="Commit docs to the docs/ branch." -LABEL com.github.actions.icon="upload-cloud" -LABEL com.github.actions.color="blue" - -RUN apt-get update && apt-get install -y git - -COPY src /actions/docs/src -ENTRYPOINT ["/actions/docs/src/entrypoint.sh"] diff --git a/.github/actions/docs/src/entrypoint.sh b/.github/actions/docs/src/entrypoint.sh deleted file mode 100755 index 042c166aa..000000000 --- a/.github/actions/docs/src/entrypoint.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -set -e - -cd $GITHUB_WORKSPACE - -# Run the build -npm run docs -NODE_ENV=production npm run build:browser - -# Initialise some useful variables -REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" -BRANCH_OR_TAG=`awk -F/ '{print $2}' <<< $GITHUB_REF` -CURRENT_BRANCH=`awk -F/ '{print $NF}' <<< $GITHUB_REF` - -if [ "$BRANCH_OR_TAG" == "heads" ]; then - SOURCE_TYPE="branch" -else - SOURCE_TYPE="tag" -fi - -# Checkout the repo in the target branch so we can build docs and push to it -TARGET_BRANCH="docs" -git clone $REPO out -b $TARGET_BRANCH - -# Move the generated JSON file to the newly-checked-out repo, to be committed and pushed -mv docs/docs.json out/$CURRENT_BRANCH.json - -# Commit and push -cd out -git add . -git config user.name "${GITHUB_ACTOR}" -git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" -git commit -m "Docs build for ${SOURCE_TYPE} ${CURRENT_BRANCH}: ${GITHUB_SHA}" || true -git push origin $TARGET_BRANCH - -# Clean up... -cd .. -rm -rf out - -# ...then do the same once more for the webpack -TARGET_BRANCH="webpack" -git clone $REPO out -b $TARGET_BRANCH - -# Move the generated webpack over -mv webpack/discord.min.js out/discord.$CURRENT_BRANCH.min.js - -# Commit and push -cd out -git add . -git config user.name "${GITHUB_ACTOR}" -git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" -git commit -m "Webpack build for ${SOURCE_TYPE} ${CURRENT_BRANCH}: ${GITHUB_SHA}" || true -git push origin $TARGET_BRANCH