-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (39 loc) · 1.05 KB
/
cd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: cd
on:
workflow_run:
workflows: [ci]
types: [completed]
branches: [main]
permissions:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
contents: read
pages: write
id-token: write
# Sets the GITHUB_TOKEN permissions to allow downloading artifacts from other workflows
actions: read
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download build
uses: actions/download-artifact@v4
with:
name: build-artifact
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
path: ./dist/
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4