Add permissions, fix artifact name, filter branches

This commit is contained in:
David Baker 2022-12-21 12:36:00 +00:00
parent 1c824da32b
commit f67eb328bf
2 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,8 @@ on:
workflows: ["Build"] workflows: ["Build"]
types: types:
- completed - completed
branches:
- main
jobs: jobs:
deploy: deploy:

View file

@ -4,10 +4,14 @@ on:
workflows: ["Build"] workflows: ["Build"]
types: types:
- completed - completed
branches-ignore:
- main
jobs: jobs:
deploy: deploy:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
deployments: write
environment: Netlify environment: Netlify
steps: steps:
- name: 📝 Create Deployment - name: 📝 Create Deployment
@ -34,7 +38,7 @@ jobs:
uses: dawidd6/action-download-artifact@v2 uses: dawidd6/action-download-artifact@v2
with: with:
run_id: ${{ github.event.workflow_run.id }} run_id: ${{ github.event.workflow_run.id }}
name: previewbuild name: build
path: webapp path: webapp
- name: Add redirects file - name: Add redirects file