Compare commits

..

12 Commits

Author SHA1 Message Date
peaceiris
2c04f23922 chore(release): 3.7.0-2
Some checks failed
Release / release (push) Has been cancelled
2020-07-24 00:42:17 +09:00
peaceiris
b15488f0b3 chore(release): Add build assets 2020-07-24 00:42:15 +09:00
peaceiris
612f1f7579 fix: chdir to workDir after copied assets
Related to #324
2020-07-24 00:40:01 +09:00
dependabot[bot]
af7aac1007 ci: bump codecov/codecov-action from v1.0.11 to v1.0.12 (#409)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.11 to v1.0.12.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.11...07127fde53bc3ccd346d47ab2f14c390161ad108)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 14:28:01 +09:00
peaceiris
6896bd8b80 docs: change default-branch to main 2020-07-23 12:17:19 +09:00
Shohei Ueda
ad558aa8bd docs: bump hugo from 0.71.1 to 0.74.2 2020-07-23 12:12:27 +09:00
Shohei Ueda
5051105279 docs: change master branch to default-branch (#408) 2020-07-23 12:10:40 +09:00
Shohei Ueda
99a89f661a docs: Add Code Scanning workflow badge 2020-07-23 11:22:23 +09:00
dependabot[bot]
8cd820bd66 ci: bump actions/setup-node from v2.1.0 to v2.1.1 (#407)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.0 to v2.1.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.1.0...321b6ccb03083caa2ad22b27dc4b45335212e824)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-22 14:42:08 +09:00
Shohei Ueda
f633b0f6b5 ci: remove types [skip ci] 2020-07-21 19:44:14 +09:00
Shohei Ueda
a2712f7b92 ci: Add docker-compose.yml (#406) 2020-07-21 19:37:23 +09:00
peaceiris
09b03c0bb1 chore(release): Remove build assets [skip ci] 2020-07-21 12:53:50 +09:00
10 changed files with 78 additions and 60 deletions

View File

@@ -10,16 +10,15 @@ on:
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
- 'docker-compose.yml'
pull_request:
types:
- opened
- synchronize
paths:
- '.github/workflows/dev-image.yml'
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
- 'docker-compose.yml'
jobs:
skipci:
@@ -34,10 +33,10 @@ jobs:
- uses: actions/checkout@v2.3.1
- name: Login to Packages
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login 'docker.pkg.github.com' -u 'peaceiris' --password-stdin
- run: make pull
- run: docker-compose pull --quiet
if: github.event_name == 'pull_request'
- run: make build
- run: make cirun cmd="npm ci"
- run: make ciall
- run: make push
- run: make ci
- run: make all
- run: docker-compose push
if: github.ref == 'refs/heads/main'

View File

@@ -34,7 +34,7 @@ jobs:
id: nvm
- name: Setup Node
uses: actions/setup-node@v2.1.0
uses: actions/setup-node@v2.1.1
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
@@ -64,7 +64,7 @@ jobs:
name: coverage-${{ matrix.os }}
path: coverage
- uses: codecov/codecov-action@v1.0.11
- uses: codecov/codecov-action@v1.0.12
with:
token: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -2,6 +2,29 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
# [3.7.0-2](https://github.com/peaceiris/actions-gh-pages/compare/v3.7.0-1...v3.7.0-2) (2020-07-23)
### ci
* Add docker-compose.yml (#406) ([a2712f7](https://github.com/peaceiris/actions-gh-pages/commit/a2712f7b923e3e05d0f46e54fbcacef3380aca31)), closes [#406](https://github.com/peaceiris/actions-gh-pages/issues/406)
* bump actions/setup-node from v2.1.0 to v2.1.1 (#407) ([8cd820b](https://github.com/peaceiris/actions-gh-pages/commit/8cd820bd660be6aa016923b6b35005df2fb071da)), closes [#407](https://github.com/peaceiris/actions-gh-pages/issues/407)
* bump codecov/codecov-action from v1.0.11 to v1.0.12 (#409) ([af7aac1](https://github.com/peaceiris/actions-gh-pages/commit/af7aac10073791e2907990204f723d6b0ff902c5)), closes [#409](https://github.com/peaceiris/actions-gh-pages/issues/409)
* remove types [skip ci] ([f633b0f](https://github.com/peaceiris/actions-gh-pages/commit/f633b0f6b54f252348cc3b10713b111caaf6f3d1))
### docs
* Add Code Scanning workflow badge ([99a89f6](https://github.com/peaceiris/actions-gh-pages/commit/99a89f661a291c444965018bf828995e08d7bb7b))
* bump hugo from 0.71.1 to 0.74.2 ([ad558aa](https://github.com/peaceiris/actions-gh-pages/commit/ad558aa8bd9ad82edc7bd886159659328e6d61de))
* change default-branch to main ([6896bd8](https://github.com/peaceiris/actions-gh-pages/commit/6896bd8b80ecc02e6c47bbcf7fc1ae0bd4d47645))
* change master branch to default-branch (#408) ([5051105](https://github.com/peaceiris/actions-gh-pages/commit/505110527986e8c3d30694488f643d6529d0d593)), closes [#408](https://github.com/peaceiris/actions-gh-pages/issues/408)
### fix
* chdir to workDir after copied assets ([612f1f7](https://github.com/peaceiris/actions-gh-pages/commit/612f1f7579820dc380d265d61924f7a7d8718859)), closes [#324](https://github.com/peaceiris/actions-gh-pages/issues/324)
# [3.7.0-1](https://github.com/peaceiris/actions-gh-pages/compare/v3.7.0-0...v3.7.0-1) (2020-07-21)

View File

@@ -1,46 +1,22 @@
cmd := "bash"
msg := ""
IMAGE_NAME := docker.pkg.github.com/peaceiris/actions-gh-pages/dev:latest
NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
.PHONY: build
build:
docker build . \
--build-arg NODE_VERSION=$(NODE_VERSION) \
--cache-from=${IMAGE_NAME} \
-t $(IMAGE_NAME)
.PHONY: pull
pull:
docker pull ${IMAGE_NAME}
.PHONY: push
push:
docker push ${IMAGE_NAME}
docker-compose build --build-arg NODE_VERSION=$(NODE_VERSION)
.PHONY: run
run:
$(DOCKER_RUN) $(cmd)
docker-compose run --rm dev bash
.PHONY: cirun
cirun:
$(DOCKER_RUN_CI) $(cmd)
.PHONY: ci
ci:
docker-compose run --rm -T dev npm ci
.PHONY: test
test:
$(DOCKER_RUN) npm test
.PHONY: commit
commit:
$(DOCKER_RUN) git commit -m "$(msg)"
docker-compose run --rm -T dev npm test
.PHONY: all
all:
$(DOCKER_RUN) npm run all
.PHONY: ciall
ciall:
$(DOCKER_RUN_CI) npm run all
docker-compose run --rm -T dev npm run all

View File

@@ -2,6 +2,7 @@
[![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)
![Test](https://github.com/peaceiris/actions-gh-pages/workflows/Test/badge.svg?branch=main&event=push)
![Code Scanning](https://github.com/peaceiris/actions-gh-pages/workflows/Code%20Scanning/badge.svg?event=push)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-gh-pages/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-gh-pages)
<img width="400" alt="GitHub Actions for deploying to GitHub Pages with Static Site Generators" src="./images/ogp.svg">
@@ -112,7 +113,7 @@ All Actions runners: Linux (Ubuntu), macOS, and Windows are supported.
### ⭐️ Repository type - Project
Add your workflow file `.github/workflows/gh-pages.yml` and push to the remote master branch.
Add your workflow file `.github/workflows/gh-pages.yml` and push to the remote default branch branch.
An example workflow for Hugo.
@@ -126,7 +127,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -140,7 +141,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.71.1'
hugo-version: '0.74.2'
- name: Build
run: hugo --minify
@@ -445,7 +446,7 @@ name: github pages
on:
push:
branches:
- master
- main
tags:
- 'v*.*.*'
@@ -477,7 +478,7 @@ jobs:
Commands on a local machine.
```console
$ # On the master branch
$ # On a main branch
$ git tag -a "v1.2.3" -m "Release v1.2.3"
$ git push origin "v1.2.3"
@@ -485,7 +486,7 @@ $ # After deployment
$ git fetch origin
$ git tag
deploy-v1.2.3 # Tag on the gh-pages branch
v1.2.3 # Tag on the master branch
v1.2.3 # Tag on the main branch
```
<div align="right">
@@ -571,7 +572,7 @@ name: github pages
on:
push:
branches:
- master
- main
schedule:
- cron: "22 22 * * *"
workflow_dispatch:
@@ -608,7 +609,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -652,7 +653,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -700,7 +701,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -751,7 +752,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -797,7 +798,7 @@ name: github pages
on:
push:
branches:
- master
- main
paths:
- '.github/workflows/deploy.yml'
- 'website/**'
@@ -854,7 +855,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -910,7 +911,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -945,7 +946,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -985,7 +986,7 @@ name: github pages
on:
push:
branches:
- master
- main
jobs:
deploy:
@@ -1061,7 +1062,7 @@ name: GitHub Pages
on:
push:
branches:
- master
- main
jobs:
deploy:

16
docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
version: '3.2'
services:
dev:
image: 'docker.pkg.github.com/peaceiris/actions-gh-pages/dev:latest'
build:
context: .
cache_from:
- 'docker.pkg.github.com/peaceiris/actions-gh-pages/dev:latest'
container_name: peaceiris_actions_github_pages
volumes:
- ${PWD}:/repo
stdin_open: true
tty: true
command:
- bash

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "actions-github-pages",
"version": "3.7.0-1",
"version": "3.7.0-2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "actions-github-pages",
"version": "3.7.0-1",
"version": "3.7.0-2",
"description": "GitHub Actions for GitHub Pages",
"main": "lib/index.js",
"engines": {

View File

@@ -51,6 +51,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
await createBranchForce(inps.PublishBranch);
process.chdir(destDir);
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
}
@@ -93,6 +94,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
}
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
} else {
throw new Error(`Failed to clone remote branch ${inps.PublishBranch}`);
@@ -104,6 +106,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
}
}