gctGenerator/.github/workflows/default.yml

32 lines
806 B
YAML
Raw Normal View History

name: Deploy
on:
push:
branches:
- '*'
- '!gh-pages'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create a new build
run: docker build -t publisher:latest -f ./dockerfiles/Deploy.Dockerfile .
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Deploy to gh-pages branch
env:
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}
PUBLISHER_NAME: ${{ secrets.PUBLISHER_NAME }}
PUBLISHER_EMAIL: ${{ secrets.PUBLISHER_EMAIL }}
run: |
docker run \
--rm \
-e GITHUB_PAT="$env:GITHUB_PAT" \
-e PUBLISHER_NAME="$env:PUBLISHER_NAME" \
-e PUBLISHER_EMAIL="$env:PUBLISHER_EMAIL" \
publisher:latest