Update action
This commit is contained in:
parent
a3cc14ba92
commit
0cd6d5824b
1 changed files with 26 additions and 11 deletions
39
.github/workflows/gh-pages.yml
vendored
39
.github/workflows/gh-pages.yml
vendored
|
|
@ -6,8 +6,20 @@ on:
|
||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
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:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
@ -22,15 +34,18 @@ jobs:
|
||||||
cp -R pkg/reconcile.js examples/website/
|
cp -R pkg/reconcile.js examples/website/
|
||||||
cp -R pkg/reconcile_bg.wasm examples/website/
|
cp -R pkg/reconcile_bg.wasm examples/website/
|
||||||
|
|
||||||
- name: Copy website files to output
|
- name: Upload artifact
|
||||||
run: |
|
uses: actions/upload-pages-artifact@v3
|
||||||
mkdir public
|
|
||||||
cp examples/website/* public/
|
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
uses: actions/gh-pages@v4
|
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
path: examples/website
|
||||||
publish_dir: ./public
|
|
||||||
publish_branch: gh-pages
|
deploy:
|
||||||
force_orphan: true
|
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