Update action
This commit is contained in:
parent
a3cc14ba92
commit
0cd6d5824b
1 changed files with 27 additions and 12 deletions
39
.github/workflows/gh-pages.yml
vendored
39
.github/workflows/gh-pages.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue