Merge pull request #1314 from EnterpriseDB/upm-114946 #1073
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Main to Netlify | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-pages: | |
| uses: ./.github/workflows/build-pages.yml | |
| with: | |
| ref: ${{ github.ref }} | |
| sha: ${{ github.sha }} | |
| gtm-id: GTM-5W8M67 | |
| secrets: inherit | |
| build-pdfs: | |
| uses: ./.github/workflows/build-pdfs.yml | |
| with: | |
| ref: ${{ github.ref }} | |
| sha: ${{ github.sha }} | |
| secrets: inherit | |
| deploy-to-netlify: | |
| needs: [build-pages, build-pdfs] | |
| uses: ./.github/workflows/deploy-to-netlify.yml | |
| with: | |
| sha: ${{ github.sha }} | |
| production: true | |
| pages-cache-key: ${{ needs.build-pages.outputs.cache-key }} | |
| pdf-cache-key: ${{ needs.build-pdfs.outputs.cache-key }} | |
| enable-pull-request-comment: false | |
| secrets: | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_MAIN_SITE_ID }} | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| report-results: | |
| needs: [deploy-to-netlify] | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: publish release notes | |
| if: success() | |
| continue-on-error: true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| draft_tag=`gh release list --repo EnterpriseDB/docs --limit 1 --json "isDraft,tagName" --jq '.[] | select(.isDraft) | .tagName'` | |
| if [[ -n "$draft_tag" ]]; then | |
| echo "Publishing draft release for: $draft_tag" | |
| gh release edit "$draft_tag" --repo EnterpriseDB/docs --draft=false | |
| fi | |
| - uses: act10ns/slack@v2 | |
| with: | |
| status: ${{ needs.deploy-to-netlify.result }} | |
| if: always() | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |