From 5c09d04912ecb3b5e1fde29fe3c509430edb2137 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Mon, 11 Oct 2021 15:22:15 +0530 Subject: [PATCH] added action for pull request previews --- .github/workflows/pull-request.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..96dbc72 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,30 @@ +name: 'Netlify Preview Deploy' + +on: + pull_request: + types: ['opened', 'synchronize'] + +jobs: + deploy: + name: "Deploy to Netlify" + 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_SITE3_ID }} + BUILD_DIRECTORY: "dist" + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v1.1 + with: + publish-dir: 'dist' + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from GitHub Actions" + enable-pull-request-comment: true + enable-commit-comment: false + overwrites-pull-request-comment: true + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE3_ID }}