diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..bada578 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,34 @@ +name: Publish Docker image + +on: + release: + types: [published] + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v3 + with: + images: ajbura/cinny + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/netlify-dev.yaml b/.github/workflows/netlify-dev.yaml new file mode 100644 index 0000000..b2174a7 --- /dev/null +++ b/.github/workflows/netlify-dev.yaml @@ -0,0 +1,21 @@ +name: 'Deploy to Netlify' + +on: + push: + branches: + - dev + +jobs: + deploy: + name: 'Deploy' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: jsmrcaga/action-netlify-deploy@master + with: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE2_ID }} + BUILD_DIRECTORY: "dist" + NETLIFY_DEPLOY_MESSAGE: "Dev deploy v${{ github.ref }}" + NETLIFY_DEPLOY_TO_PROD: true \ No newline at end of file diff --git a/.github/workflows/netlify-prod.yaml b/.github/workflows/netlify-prod.yaml new file mode 100644 index 0000000..962ae1a --- /dev/null +++ b/.github/workflows/netlify-prod.yaml @@ -0,0 +1,20 @@ +name: 'Deploy to Netlify' + +on: + release: + types: [published] + +jobs: + deploy: + name: 'Deploy' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: jsmrcaga/action-netlify-deploy@master + with: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + BUILD_DIRECTORY: "dist" + NETLIFY_DEPLOY_MESSAGE: "Prod deploy v${{ github.ref }}" + NETLIFY_DEPLOY_TO_PROD: true \ No newline at end of file