Skip to content

Commit 51953dc

Browse files
committed
add deploy.yml
1 parent 4fcfc9e commit 51953dc

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
artifact_id:
7+
description: The ID of the source artifact
8+
required: true
9+
type: string
10+
run_id:
11+
description: The ID of the run containing the source artifact
12+
required: true
13+
type: string
14+
15+
jobs:
16+
prepare:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
20+
id: auth
21+
with:
22+
app-id: ${{ secrets.APP_ID }}
23+
owner: ${{ secrets.PAGES_SOURCE_REPO_OWNER }}
24+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
25+
repositories: ${{ secrets.PAGES_SOURCE_REPO_NAME }}
26+
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
27+
with:
28+
artifact-ids: ${{ inputs.artifact_id }}
29+
github-token: ${{ steps.auth.outputs.token }}
30+
path: _site/
31+
repository: ${{ secrets.PAGES_SOURCE_REPO_OWNER }}${{ '/' }}${{ secrets.PAGES_SOURCE_REPO_NAME }}
32+
run-id: ${{ inputs.run_id }}
33+
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
needs: prepare
39+
permissions:
40+
id-token: write
41+
pages: write
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
45+
id: deployment

0 commit comments

Comments
 (0)