Skip to content

Commit 5f6537b

Browse files
committed
add deploy.yml
1 parent 4fcfc9e commit 5f6537b

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
repository: ${{ secrets.PAGES_SOURCE_REPO_OWNER }}${{ '/' }}${{ secrets.PAGES_SOURCE_REPO_NAME }}
31+
run-id: ${{ inputs.run_id }}
32+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
33+
with:
34+
compression-level: 0
35+
name: github-pages
36+
path: artifact.tar
37+
retention-days: 1
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
needs: prepare
43+
permissions:
44+
id-token: write
45+
pages: write
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
49+
id: deployment

0 commit comments

Comments
 (0)