File size: 1,074 Bytes
d8ffc32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
name: Build, Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-push-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
- name: Build Docker image
run: docker build -t joshuasundance/langchain-streamlit-demo .
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: joshuasundance
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
run: docker push joshuasundance/langchain-streamlit-demo:latest
push-to-huggingface:
needs: build-and-push-docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
- name: Push to HuggingFace Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git push https://joshuasundance:[email protected]/spaces/joshuasundance/langchain-streamlit-demo main
|