-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.4 KB
/
deploy.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
44
45
46
47
48
49
50
51
52
53
name: Deploy Pages
# Controls when the workflow will run
on:
repository_dispatch:
types: ['deploy'] # custom event type: 'deploy'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Download a build artifact that was previously uploaded in the workflow by the upload-artifact action
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: public
github-token: ${{ secrets.GH_TOKEN }}
repository: ${{ secrets.SRC_REPO }}
run-id: ${{ github.event.client_payload.run_id }}
- name: Extract
run: |
ls -lah .
mkdir public
tar -xf artifact.tar -C public
ls -lh public/
- name: Setup pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'public/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4