File tree Expand file tree Collapse file tree 2 files changed +24
-21
lines changed
Expand file tree Collapse file tree 2 files changed +24
-21
lines changed Original file line number Diff line number Diff line change @@ -78,13 +78,31 @@ jobs:
7878 with :
7979 name : execution-reports
8080 path : _build/html/reports
81+ - name : Install Netlify CLI
82+ shell : bash -l {0}
83+ run : npm install -g netlify-cli
8184 - name : Preview Deploy to Netlify
82- uses : nwtgck/actions-netlify@v3
83- with :
84- publish-dir : ' _build/html/'
85- production-branch : main
86- github-token : ${{ secrets.GITHUB_TOKEN }}
87- deploy-message : " Preview Deploy from GitHub Actions"
85+ shell : bash -l {0}
86+ run : |
87+ if [ "${{ github.event_name }}" = "pull_request" ]; then
88+ netlify deploy \
89+ --dir _build/html/ \
90+ --site ${{ secrets.NETLIFY_SITE_ID }} \
91+ --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} \
92+ --alias pr-${{ github.event.pull_request.number }} \
93+ --context deploy-preview \
94+ --message "Preview Deploy from GitHub Actions PR #${{ github.event.pull_request.number }} (commit: ${{ github.sha }})" \
95+ --json
96+ else
97+ netlify deploy \
98+ --dir _build/html/ \
99+ --site ${{ secrets.NETLIFY_SITE_ID }} \
100+ --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} \
101+ --alias manual-${{ github.run_id }} \
102+ --context dev \
103+ --message "Manual Deploy from GitHub Actions (commit: ${{ github.sha }})" \
104+ --json
105+ fi
88106 env :
89107 NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
90108 NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments