Skip to content

Commit

Permalink
Deploy twice to have a way to refer to doc latest
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Jun 24, 2024
1 parent 87161b1 commit 501573e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/doc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ permissions:
# on pull request https://doc-pr-12345--NETLIFY_SITE
# on push branch develop https://doc-develop--NETLIFY_SITE
# on push tag https://doc-10-4-beta2--NETLIFY_SITE
# on push tag https://doc-release--NETLIFY_SITE
#
# where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage.
#
Expand Down Expand Up @@ -128,7 +129,7 @@ jobs:
run: unzip livedoc.zip -d livedoc
if: steps.download-doc.outcome == 'success'

- name: Deploy to Netlify
- name: Deploy to netlify with doc-TAG alias
id: deploy-netlify
uses: netlify/actions/cli@master
with:
Expand All @@ -140,6 +141,15 @@ jobs:
NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }}
if: steps.download-doc.outcome == 'success'

- name: Deploy to netlify with doc-release alias
uses: netlify/actions/cli@master
with:
args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
if: steps.download-doc.outcome == 'success'

- name: Report deployment url
run: |
echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}"
Expand Down

0 comments on commit 501573e

Please sign in to comment.