docs/.github/workflows/build-pr.yml

28 lines
1011 B
YAML

name: build docker image when PR is opened
on: pull_request
jobs:
build-static-page:
name: build
runs-on: ubuntu-18.04
env:
DOCKER_BUILDKIT: '1'
steps:
- name: print docker info
run: docker version && docker info
- uses: actions/checkout@v2
- name: build image
run: docker build --target=current -t documentation:latest .
# Disabled netlify-deploy due to flakey 502 http errors
# - name: copy static files
# if: github.event.pull_request.head.repo.fork == false
# run: docker run -v ${PWD}:/output documentation:latest cp -r /usr/share/nginx/html /output/_site
# - uses: ./.github/actions/netlify-deploy
# if: github.event.pull_request.head.repo.fork == false
# with:
# directory: _site
# netlify_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# netlify_account_slug: ${{ secrets.NETLIFY_ACCOUNT_SLUG }}
# site_name: "${{ github.repository }}/${{ github.head_ref }}"