Added workflows for docker/netlify
This commit is contained in:
parent
180973d49f
commit
e7f4a5bd59
3 changed files with 75 additions and 0 deletions
34
.github/workflows/docker.yaml
vendored
Normal file
34
.github/workflows/docker.yaml
vendored
Normal file
|
@ -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 }}
|
21
.github/workflows/netlify-dev.yaml
vendored
Normal file
21
.github/workflows/netlify-dev.yaml
vendored
Normal file
|
@ -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
|
20
.github/workflows/netlify-prod.yaml
vendored
Normal file
20
.github/workflows/netlify-prod.yaml
vendored
Normal file
|
@ -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
|
Loading…
Reference in a new issue