Skip to content

Commit b940fe5

Browse files
committed
fix script
1 parent f3f5383 commit b940fe5

File tree

3 files changed

+58
-86
lines changed

3 files changed

+58
-86
lines changed

.github/actions/generate/action.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 0 additions & 63 deletions
This file was deleted.

.github/workflows/generate.yaml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
name: generate
22
on:
3-
# workflow_dispatch:
3+
workflow_dispatch:
44
workflow_call:
5+
push:
6+
branches:
7+
- main
8+
paths-ignore:
9+
- README.md
10+
- .github/**
11+
- .vscode/**
12+
- "!.github/workflows/**"
13+
pull_request:
14+
branches:
15+
- main
516

617
jobs:
718
generate:
@@ -25,3 +36,49 @@ jobs:
2536
with:
2637
name: MKVerilog-lib.zip
2738
path: out
39+
40+
deploy:
41+
needs: [generate]
42+
runs-on: ubuntu-latest
43+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
44+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
45+
concurrency:
46+
group: pages
47+
cancel-in-progress: false
48+
permissions:
49+
contents: read
50+
pages: write
51+
id-token: write
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v3
58+
59+
- shell: bash
60+
run: mkdir out_deploy
61+
62+
- uses: actions/download-artifact@v3
63+
with:
64+
name: MKVerilog-lib.zip
65+
path: out
66+
67+
- shell: bash
68+
run: |
69+
cd out_deploy
70+
cp -r ../out/assets assets
71+
cp ../out/README.html index.html
72+
ln -s index.html 404.html
73+
74+
- name: Setup Pages
75+
uses: actions/configure-pages@v3
76+
77+
- name: Upload artifact
78+
uses: actions/upload-pages-artifact@v2
79+
with:
80+
path: out_deploy
81+
82+
- name: Deploy to GitHub Pages
83+
id: deployment
84+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)