2020-06-30 08:19:15 +09:00
|
|
|
name: CD Pipeline
|
2020-06-29 10:23:45 +09:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2020-06-30 06:38:43 +09:00
|
|
|
- 'master'
|
2020-06-29 10:23:45 +09:00
|
|
|
|
|
|
|
jobs:
|
2020-06-30 06:38:43 +09:00
|
|
|
deploy:
|
2020-06-29 10:23:45 +09:00
|
|
|
runs-on: ubuntu-latest
|
2020-06-30 08:20:03 +09:00
|
|
|
if: ${{ (github.ref == 'refs/heads/master') && (! contains(toJSON(github.event.commits.*.msg), '[skip ci]')) }}
|
2020-06-29 10:23:45 +09:00
|
|
|
steps:
|
2020-06-29 10:25:20 +09:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
2020-06-29 10:23:45 +09:00
|
|
|
- name: Create a new build
|
2020-06-30 06:58:10 +09:00
|
|
|
shell: bash
|
2020-06-29 10:23:45 +09:00
|
|
|
run: docker build -t publisher:latest -f ./dockerfiles/Deploy.Dockerfile .
|
|
|
|
- name: Deploy to gh-pages branch
|
2020-06-30 06:58:10 +09:00
|
|
|
shell: bash
|
2020-06-29 10:23:45 +09:00
|
|
|
env:
|
2020-06-29 10:25:20 +09:00
|
|
|
REPOSITORY_TOKEN: ${{ secrets.REPOSITORY_TOKEN }}
|
2020-06-29 10:23:45 +09:00
|
|
|
PUBLISHER_NAME: ${{ secrets.PUBLISHER_NAME }}
|
|
|
|
PUBLISHER_EMAIL: ${{ secrets.PUBLISHER_EMAIL }}
|
|
|
|
run: |
|
|
|
|
docker run \
|
|
|
|
--rm \
|
2020-06-30 06:58:10 +09:00
|
|
|
-e REPOSITORY_TOKEN="$REPOSITORY_TOKEN" \
|
|
|
|
-e PUBLISHER_NAME="$PUBLISHER_NAME" \
|
|
|
|
-e PUBLISHER_EMAIL="$PUBLISHER_EMAIL" \
|
2020-06-29 10:23:45 +09:00
|
|
|
publisher:latest
|