Merge pull request #3 from kaledmolina/main #32
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: ["main"] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup env vars | |
| run: | | |
| printf "${{secrets.BUILD_ENVIRONMENT_VARIABLES}}" > .env.production | |
| - name: Login with docker | |
| run: | | |
| echo "${{secrets.DOCKER_PASSWORD}}" | docker login --username ${{secrets.DOCKER_USER}} --password-stdin | |
| - name: Import server key from secrets | |
| run: | | |
| echo "${{secrets.AMAZON_SERVER_KEY}}" > server-key.pem | |
| chmod 600 server-key.pem | |
| - name: Build and Deploy | |
| run: | | |
| sh deploy.sh |