diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8f1206898..24daa5758 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -57,3 +57,17 @@ jobs: run: make documentation env: POLICYENGINE_GITHUB_MICRODATA_AUTH_TOKEN: ${{ secrets.POLICYENGINE_GITHUB_MICRODATA_AUTH_TOKEN}} + Docker: + name: Docker + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build container + run: docker build docs/streamlit -t ghcr.io/policyengine/policyengine-uk-documentation diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3c93efa49..26c33836b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -79,6 +79,25 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages # The branch the action should deploy to. FOLDER: docs/book/_build/html # The folder the action should deploy. + Docker: + if: | + (github.repository == 'PolicyEngine/policyengine-uk') + && (github.event.head_commit.message == 'Update PolicyEngine UK') + name: Docker + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build container + run: docker build docs/streamlit -t ghcr.io/policyengine/policyengine-uk-documentation + - name: Push container + run: docker push ghcr.io/policyengine/policyengine-uk-documentation Publish: if: | (github.repository == 'PolicyEngine/policyengine-uk') diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..a36a4eccf 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Docker image deployment for streamlit documentation.