gctGenerator/.github/workflows/deploy.yml

31 lines
844 B
YAML
Raw Normal View History

2020-06-29 23:38:43 +02:00
name: Build & Deploy
on:
push:
branches:
2020-06-29 23:38:43 +02:00
- 'master'
jobs:
2020-06-29 23:38:43 +02:00
deploy:
runs-on: ubuntu-latest
2020-06-29 23:38:43 +02:00
if: github.ref == 'refs/heads/master'
steps:
2020-06-29 03:25:20 +02:00
- name: Checkout
uses: actions/checkout@v1
- name: Create a new build
2020-06-29 23:58:10 +02:00
shell: bash
run: docker build -t publisher:latest -f ./dockerfiles/Deploy.Dockerfile .
- name: Deploy to gh-pages branch
2020-06-29 23:58:10 +02:00
shell: bash
env:
2020-06-29 03:25:20 +02:00
REPOSITORY_TOKEN: ${{ secrets.REPOSITORY_TOKEN }}
PUBLISHER_NAME: ${{ secrets.PUBLISHER_NAME }}
PUBLISHER_EMAIL: ${{ secrets.PUBLISHER_EMAIL }}
run: |
docker run \
--rm \
2020-06-29 23:58:10 +02:00
-e REPOSITORY_TOKEN="$REPOSITORY_TOKEN" \
-e PUBLISHER_NAME="$PUBLISHER_NAME" \
-e PUBLISHER_EMAIL="$PUBLISHER_EMAIL" \
publisher:latest