From 811dd9076e4c0242a34a274cf0984c89cbb36420 Mon Sep 17 00:00:00 2001 From: Avelino Date: Wed, 22 Dec 2021 10:39:23 -0300 Subject: [PATCH] site deploy action run only main branch Signed-off-by: Avelino --- .github/workflows/site-deploy.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/site-deploy.yaml diff --git a/.github/workflows/site-deploy.yaml b/.github/workflows/site-deploy.yaml new file mode 100644 index 00000000..673e4f31 --- /dev/null +++ b/.github/workflows/site-deploy.yaml @@ -0,0 +1,27 @@ +name: site-deploy + +on: + push: + branches: + - 'main' + +jobs: + build: + name: Make and Deploy site + runs-on: ubuntu-latest + environment: netlify + container: golang:latest + needs: tests + steps: + - uses: actions/checkout@1.0.0 + - name: Get dependencies + run: go get -v -t -d ./... + - name: Make awesome-go.com + run: go run make_site.go scripts.go + - name: deploy awesome-go.com + uses: jsmrcaga/action-netlify-deploy@v1.1.0 + with: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_DEPLOY_TO_PROD: true + build_directory: tmpl