Update action

This commit is contained in:
Andras Schmelczer 2025-06-15 12:25:40 +01:00
parent a3cc14ba92
commit 0cd6d5824b
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -6,8 +6,20 @@ on:
- main
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# 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.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
build:
runs-on: ubuntu-latest
permissions:
contents: write
@ -22,15 +34,18 @@ jobs:
cp -R pkg/reconcile.js examples/website/
cp -R pkg/reconcile_bg.wasm examples/website/
- name: Copy website files to output
run: |
mkdir public
cp examples/website/* public/
- name: Deploy to GitHub Pages
uses: actions/gh-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages
force_orphan: true
path: examples/website
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4