Update deploy.yml #2
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: Docker Image CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - | |
| name: Login to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: Install SSH Key | |
| # uses: shimataro/ssh-key-action@v2 | |
| # with: | |
| # key: ${{ secrets.PIPELINE_PRIVATE_KEY }} | |
| # known_hosts: unnecessary | |
| - name: Build the Docker image | |
| run: | | |
| docker build . --file Dockerfile --tag ghcr.io/bossboxing/friendblockly:latest | |
| docker push ghcr.io/bossboxing/friendblockly:latest | |
| # - name: Deploy To Server | |
| # uses: appleboy/ssh-action@master | |
| # with: | |
| # host: ${{ secrets.HOST }} | |
| # username: 'root' | |
| # password: ${{ secrets.PASSWORD }} | |
| # # key: ${{ secrets.PIPELINE_PRIVATE_KEY }} | |
| # port: 22 | |
| # script: | | |
| # cd /root/workspace/ | |
| # docker compose pull markodd-backend | |
| # docker compose up -d markodd-backend | |
| # docker image prune -af | |