From 8723c5a4d33a910c6c6843a9921bcb891257c403 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 16 Nov 2023 16:32:19 +0100 Subject: [PATCH] Try another gh-pages publish workflow --- .github/workflows/deploy_web_demo.yml | 31 +++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/deploy_web_demo.yml b/.github/workflows/deploy_web_demo.yml index c1efe513487..dda7b15f1b0 100644 --- a/.github/workflows/deploy_web_demo.yml +++ b/.github/workflows/deploy_web_demo.yml @@ -4,15 +4,16 @@ on: # We only run this on merges to master push: branches: ["master"] - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +# to only run when you do a new github release, comment out above part and uncomment the below trigger. +# on: +# release: +# types: ["published"] + -# Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: - contents: read - pages: write # to deploy to Pages - id-token: write # to verify the deployment originates from an appropriate source + contents: write # for committing to gh-pages branch # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. @@ -33,10 +34,6 @@ jobs: deploy: name: Deploy web demo - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest steps: - name: Checkout @@ -60,14 +57,10 @@ jobs: - run: | scripts/build_demo_web.sh --release - - name: Setup Pages - uses: actions/configure-pages@v3 - - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 with: - path: "docs" - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 + folder: docs + # this option will not maintain any history of your previous pages deployment + # set to false if you want all page build to be committed to your gh-pages branch history + single-commit: true