@@ -4,9 +4,59 @@ A composite Action for packaging and uploading artifact that can be deployed to
4
4
5
5
## Usage
6
6
7
- See [ action.yml] ( action.yml )
7
+ See [ action.yml] ( action.yml ) for the various ` inputs ` this action supports (or [ below] ( #inputs-📥 ) ).
8
+
9
+ We recommend this action to be used in the build job:
10
+
11
+ ``` yaml
12
+ jobs :
13
+ # Build job
14
+ build :
15
+
16
+ # Specify runner + build & upload the static files as an artifact
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name: Build static files
20
+ id: build
21
+ run: |
22
+ # <Not provided for brevity>
23
+ # At a minimum this step should build the static files of your site
24
+ # <Not provided for brevity>
25
+
26
+ - name : Upload static files as artifact
27
+ id : deployment
28
+ uses : actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
29
+ with:
30
+ path: build_outputs_folder/
31
+
32
+ # Deployment job
33
+ deploy :
34
+ environment :
35
+ name : github-pages
36
+ url : ${{ steps.deployment.outputs.page_url }}
37
+ runs-on : ubuntu-latest
38
+ needs : build
39
+ steps :
40
+ - name : Deploy to GitHub Pages
41
+ id : deployment
42
+ uses : actions/deploy-pages@v4
43
+
44
+ ```
45
+
46
+ ### Inputs 📥
47
+
48
+ | Input | Required? | Default | Description |
49
+ | ---------------- | --------- | ----------------------- | -------------------------------------------------- |
50
+ | ` name ` | ` false ` | ` github-pages ` | Artifact name |
51
+ | ` path ` | ` true ` | ` _site/ ` | Path of the directory containing the static assets |
52
+ | ` retention-days ` | ` false ` | ` 1 ` | Duration after which artifact will expire in days |
53
+
54
+ ### Outputs 📤
55
+
56
+ | Output | Description |
57
+ | ------------- | ---------------------------------------- |
58
+ | ` artifact_id ` | The ID of the artifact that was uploaded |
8
59
9
- <!-- TODO: document custom workflow -->
10
60
11
61
## Artifact validation
12
62
0 commit comments