Compare commits

..

16 Commits

Author SHA1 Message Date
peaceiris
e4df4b2d92 github: Enhance action name 2019-10-29 03:30:53 +09:00
peaceiris
d6d7a5601d github: Remove FUNDING.yml 2019-10-29 03:27:49 +09:00
peaceiris
cd78101d9c docs: Remove Hugo --gc flag
This flag should be used on local.
It is wasteful to use the Garbage Collection on CI.
2019-10-24 21:46:41 +09:00
peaceiris
8076e77c01 github: Add CODEOWNERS 2019-10-24 06:04:56 +09:00
peaceiris
5e8a6ff9d9 ci: Add dependabot config 2019-10-23 19:52:00 +09:00
dependabot-preview[bot]
78a8692f54 build(deps): bump alpine from 3.10.2 to 3.10.3 (#44)
Bumps alpine from 3.10.2 to 3.10.3.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-22 15:08:18 +09:00
peaceiris
69067de181 docs: Remove the link to actions tab
We need to login to access the actions tab.

https://github.com/sdras/awesome-actions/issues/232
2019-10-17 16:36:44 +09:00
peaceiris
7f7794a793 docs: update Hugo workflow example, enhance build step 2019-10-14 22:03:59 +09:00
peaceiris
e60d374041 docs: Enhance node-version 2019-10-08 18:59:10 +09:00
imgbot[bot]
8191f265b1 [ImgBot] Optimize images (#40)
/images/ogp.svg -- 45.84kb -> 45.82kb (0.05%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2019-10-08 14:00:13 +09:00
peaceiris
4eb9565412 docs: update 2019-10-07 03:20:07 +09:00
peaceiris
e5910bfc4f docs: update tag 2019-10-07 00:21:11 +09:00
peaceiris
09158e35aa docs: Fix tag 2019-10-07 00:01:25 +09:00
peaceiris
26405de510 docs: update latest tag 2019-10-07 00:00:09 +09:00
Shohei Ueda
855ba06744 Release: v2.5.0 (#38)
* gha: enhance trigger
* feat: Add SCRIPT_MODE
* docs: Update about GITHUB_TOKEN
* docs: Add new section about Script mode, close #37
2019-10-06 23:53:36 +09:00
peaceiris
159b07d518 docs: update 2019-10-06 21:10:05 +09:00
8 changed files with 52 additions and 57 deletions

10
.dependabot/config.yml Normal file
View File

@@ -0,0 +1,10 @@
version: 1
update_configs:
- package_manager: "docker"
directory: "/"
update_schedule: "weekly"
default_labels:
- "dependencies"
- "docker"
commit_message:
prefix: "deps"

3
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,3 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
* @peaceiris

9
.github/FUNDING.yml vendored
View File

@@ -1,9 +0,0 @@
# These are supported funding model platforms
# github: peaceiris
patreon: peaceiris
issuehunt: peaceiris
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL

View File

@@ -1,4 +1,4 @@
FROM alpine:3.10.2
FROM alpine:3.10.3
RUN apk add --no-cache \
bash \

View File

@@ -1,7 +1,7 @@
[![license](https://img.shields.io/github/license/peaceiris/actions-gh-pages.svg)](https://github.com/peaceiris/actions-gh-pages/blob/master/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-gh-pages.svg)](https://github.com/peaceiris/actions-gh-pages/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-gh-pages.svg)](https://github.com/peaceiris/actions-gh-pages/releases)
[![GitHub Actions status](https://github.com/peaceiris/actions-gh-pages/workflows/docker%20image%20ci/badge.svg)](https://github.com/peaceiris/actions-gh-pages/actions)
![GitHub Actions status](https://github.com/peaceiris/actions-gh-pages/workflows/docker%20image%20ci/badge.svg)
[![Docker Hub Build Status](https://img.shields.io/docker/cloud/build/peaceiris/gh-pages.svg)](https://hub.docker.com/r/peaceiris/gh-pages)
<img width="400" alt="GitHub Actions for deploying to GitHub Pages with Static Site Generators" src="./images/ogp.svg">
@@ -17,7 +17,7 @@ This deploy action can be combined simply and freely with [Static Site Generator
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -122,15 +122,15 @@ jobs:
# submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.2.1
uses: peaceiris/actions-hugo@v2.2.2
with:
hugo-version: '0.58.3'
- name: Build
run: hugo --gc --minify --cleanDestinationDir
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -180,8 +180,8 @@ You can pull a public docker image from Docker Hub.
By pulling docker images, you can reduce the overall execution time of your workflow. In addition, `latest` tag is provided.
```diff
- uses: peaceiris/actions-gh-pages@v2.4.0
+ uses: docker://peaceiris/gh-pages:v2.4.0
- uses: peaceiris/actions-gh-pages@v2.5.0
+ uses: docker://peaceiris/gh-pages:v2.5.0
```
- [peaceiris/gh-pages - Docker Hub](https://hub.docker.com/r/peaceiris/gh-pages)
@@ -218,7 +218,7 @@ For example:
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -235,7 +235,7 @@ For example:
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -254,11 +254,11 @@ For example:
```yaml
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
EXTERNAL_REPOSITORY: username/username.github.io
PUBLISH_BRANCH: master
EXTERNAL_REPOSITORY: username/external-repository
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
```
@@ -272,12 +272,16 @@ Be careful, `GITHUB_TOKEN` has no permission to access to external repositories.
From `v2.5.0`, we can run this action as a shell script.
There is no Docker build or pull step, so it will start immediately.
- `ACTIONS_DEPLOY_KEY` requires `SCRIPT_MODE: true`
- `*_TOKEN` do not require `SCRIPT_MODE`
```yaml
- name: Deploy
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./public
SCRIPT_MODE: true
run: |
wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2.5.0/entrypoint.sh
bash ./entrypoint.sh
@@ -378,13 +382,13 @@ jobs:
- name: build
uses: actions/setup-node@v1
with:
node-version: '10.16'
node-version: '10.x'
- run: |
npm install
npm run build
- name: deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -417,7 +421,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v1
with:
node-version: '10.16'
node-version: '10.x'
- name: install
run: npm install
@@ -432,7 +436,7 @@ jobs:
run: npm run build
- name: deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -467,7 +471,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v1
with:
node-version: '10.16'
node-version: '10.x'
- name: install
run: yarn install
@@ -482,7 +486,7 @@ jobs:
run: touch ./out/.nojekyll
- name: deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -517,7 +521,7 @@ jobs:
- name: setup node
uses: actions/setup-node@v1
with:
node-version: '10.16'
node-version: '10.x'
- name: install
run: npm install
@@ -529,7 +533,7 @@ jobs:
run: npm run generate
- name: deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
@@ -577,7 +581,7 @@ jobs:
run: mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.4.0
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages

View File

@@ -1,4 +1,4 @@
name: 'Deploy action for GitHub Pages'
name: 'GitHub Pages action'
description: 'GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.'
author: 'peaceiris'
runs:

View File

@@ -28,10 +28,16 @@ if [ -n "${ACTIONS_DEPLOY_KEY}" ]; then
print_info "setup with ACTIONS_DEPLOY_KEY"
mkdir "${HOME}/.ssh"
ssh-keyscan -t rsa github.com > "${HOME}/.ssh/known_hosts"
echo "${ACTIONS_DEPLOY_KEY}" > "${HOME}/.ssh/id_rsa"
chmod 400 "${HOME}/.ssh/id_rsa"
if [ -n "${SCRIPT_MODE}" ]; then
print_info "run as SCRIPT_MODE"
SSH_DIR="${HOME}/.ssh"
else
SSH_DIR="/root/.ssh"
fi
mkdir "${SSH_DIR}"
ssh-keyscan -t rsa github.com > "${SSH_DIR}/known_hosts"
echo "${ACTIONS_DEPLOY_KEY}" > "${SSH_DIR}/id_rsa"
chmod 400 "${SSH_DIR}/id_rsa"
remote_repo="git@github.com:${PUBLISH_REPOSITORY}.git"
@@ -70,7 +76,7 @@ fi
remote_branch="${PUBLISH_BRANCH}"
local_dir="${HOME}/$(tr -cd 'a-f0-9' < /dev/urandom | head -c 32)"
local_dir="${HOME}/ghpages_${RANDOM}"
if git clone --depth=1 --single-branch --branch "${remote_branch}" "${remote_repo}" "${local_dir}"; then
cd "${local_dir}"

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB