|
86 | 86 | run: dotnet build --no-restore $SOLUTION_LOCATION |
87 | 87 | - name: Test |
88 | 88 | run: dotnet test --no-build --verbosity normal $SOLUTION_LOCATION |
89 | | - netlifypreview: |
90 | | - needs: [linting, spellcheck, build, snippets] |
91 | | - name: "Netlify Preview (PR only)" |
92 | | - runs-on: ubuntu-latest |
93 | | - if: ${{ github.ref != 'refs/heads/master'}} |
94 | | - steps: |
95 | | - - name: Download site artifacts |
96 | | - uses: actions/download-artifact@v5 |
97 | | - with: |
98 | | - name: siteArtifact |
99 | | - - name: unzip site contents |
100 | | - run: unzip _site.zip |
101 | | - - name: Start deployment (PR only) |
102 | | - if: ${{ github.ref != 'refs/heads/master'}} |
103 | | - uses: bobheadxi/deployments@v1 |
104 | | - id: deployment |
105 | | - with: |
106 | | - env: preview_${{github.event.number}} |
107 | | - step: start |
108 | | - token: ${{ secrets.SEAN_PAT_TO_MANAGE_ENVIRONMENTS }} |
109 | | - - name: Deploy to Netlify (PR only) |
110 | | - if: ${{ github.ref != 'refs/heads/master'}} |
111 | | - uses: South-Paw/action-netlify-cli@v2 |
112 | | - id: netlify |
113 | | - with: |
114 | | - # note that the --json flag has been passed so we can parse outputs |
115 | | - args: deploy --json --dir './docs/_site' --message 'preview [${{ github.sha }}]' |
116 | | - env: |
117 | | - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} |
118 | | - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |
119 | | - - name: Update Preview link comment |
120 | | - if: ${{ github.ref != 'refs/heads/master'}} |
121 | | - uses: marocchino/sticky-pull-request-comment@v2 |
122 | | - with: |
123 | | - header: previewlink |
124 | | - message: | |
125 | | - Preview link: ${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url }} |
126 | | - - name: Finish deployment |
127 | | - uses: bobheadxi/deployments@v1 |
128 | | - if: ${{ github.ref != 'refs/heads/master'}} |
129 | | - with: |
130 | | - env: ${{ steps.deployment.outputs.env }} |
131 | | - step: finish |
132 | | - status: ${{ job.status }} |
133 | | - deployment_id: ${{ steps.deployment.outputs.deployment_id }} |
134 | | - env_url: ${{ fromJson(steps.netlify.outputs.NETLIFY_OUTPUT).deploy_url }} |
135 | | - token: ${{ secrets.SEAN_PAT_TO_MANAGE_ENVIRONMENTS }} |
136 | 89 | publish: |
137 | 90 | name: Publish (master branch only) |
138 | 91 | needs: [linting, spellcheck, build, snippets] |
|
0 commit comments