forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ jobs: | |
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_MESSAGE: preview-${{ github.ref == 'refs/heads/develop' && 'release' || steps.source-run-info.outputs.pullRequestNumber }} | ||
NETLIFY_ALIAS: preview-${{ github.ref == 'refs/heads/develop' && 'release' || steps.source-run-info.outputs.pullRequestNumber }} | ||
NETLIFY_MESSAGE: doc-${{ github.ref == 'refs/heads/develop' && 'develop' || format('pr-{0}', steps.source-run-info.outputs.pullRequestNumber) }} | ||
NETLIFY_ALIAS: doc-${{ github.ref == 'refs/heads/develop' && 'develop' || format('pr-{0}', steps.source-run-info.outputs.pullRequestNumber) }} | ||
|
||
# Add deployment as status check, PR comment and annotation | ||
# we could use the nwtgck/actions-netlify action for that, except for that it is not (yet) working in workflow_run context: https://github.com/nwtgck/actions-netlify/issues/545 | ||
|
@@ -94,7 +94,7 @@ jobs: | |
publish-live-doc: | ||
runs-on: ubuntu-latest | ||
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'sagemath/sage' && github.event.workflow_run.head_branch == 'develop' | ||
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'sagemath/sage' && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Download live doc | ||
uses: actions/[email protected] | ||
|
@@ -120,6 +120,10 @@ jobs: | |
- name: Extract live doc | ||
run: unzip livedoc.zip -d doc && unzip doc/livedoc.zip -d doc/doc | ||
|
||
- name: Get REF_NAME | ||
run: | | ||
echo "REF_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
- name: Deploy to Netlify | ||
id: deploy-netlify | ||
uses: netlify/actions/cli@master | ||
|
@@ -128,8 +132,8 @@ jobs: | |
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_MESSAGE: livedoc | ||
NETLIFY_ALIAS: livedoc | ||
NETLIFY_MESSAGE: doc-${{ env.REF_NAME }} | ||
NETLIFY_ALIAS: doc-${{ env.REF_NAME }} | ||
|
||
- name: Report deployment url | ||
run: | | ||
|
This file contains 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