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"]
types:
- completed
branches:
- main
jobs:
deploy:

View file

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