Try another gh-pages publish workflow

This commit is contained in:
Emil Ernerfeldt 2023-11-16 16:32:19 +01:00
parent 8a66040ad9
commit 8723c5a4d3
1 changed files with 12 additions and 19 deletions

View File

@ -4,15 +4,16 @@ on:
# We only run this on merges to master # We only run this on merges to master
push: push:
branches: ["master"] branches: ["master"]
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: 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: permissions:
contents: read contents: write # for committing to gh-pages branch
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # 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. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@ -33,10 +34,6 @@ jobs:
deploy: deploy:
name: Deploy web demo name: Deploy web demo
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -60,14 +57,10 @@ jobs:
- run: | - run: |
scripts/build_demo_web.sh --release scripts/build_demo_web.sh --release
- name: Setup Pages - name: Deploy
uses: actions/configure-pages@v3 uses: JamesIves/github-pages-deploy-action@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with: with:
path: "docs" folder: docs
# this option will not maintain any history of your previous pages deployment
- name: Deploy to GitHub Pages # set to false if you want all page build to be committed to your gh-pages branch history
id: deployment single-commit: true
uses: actions/deploy-pages@v2