test : 도커 이미지 빌드스 태그 추가 #44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Frontend | |
| on: | |
| push: | |
| branches: | |
| - action | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: env setting | |
| run: | | |
| echo "${{secrets.ENV}}" > .env | |
| echo "created env." | |
| - name: env file | |
| run: cat .env | |
| - name: docker login | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_ID }} | |
| password: ${{ secrets.DOCKER_PWD }} | |
| - name: docker image bulid | |
| run: | | |
| docker build -t ${{ secrets.DOCKER_ID }}/${{ secrets.DOCKER_REPOSITORY }}:${{ secrets.DOCKER_TAG }} . | |
| - name: SSH into server and deploy | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.SSH_HOST }} | |
| username: ${{ secrets.SSH_USERNAME }} | |
| password: ${{ secrets.SSH_PASSWORD }} | |
| port: 22 | |
| # script: | | |
| # cd /docker/front | |
| # ./deploy.sh |