2
2
3
3
A composite Action for packaging and uploading artifact that can be deployed to [ GitHub Pages] [ pages ] .
4
4
5
- # Scope
5
+ ## Scope
6
6
7
7
⚠️ Official support for building Pages with Actions is in public beta at the moment.
8
8
9
- # Usage
9
+ ## Usage
10
10
11
11
See [ action.yml] ( action.yml )
12
12
13
13
<!-- TODO: document custom workflow -->
14
14
15
- # Artifact validation
15
+ ## Artifact validation
16
16
17
17
While using this action is optional, we highly recommend it since it takes care of producing (mostly) valid artifacts.
18
18
@@ -25,8 +25,9 @@ The [`tar` file][tar] must:
25
25
26
26
- be under 10GB in size
27
27
- not contain any symbolic or hard links
28
+ - contain only files and directories that all meet the expected minimum [ file permissions] ( #file-permissions )
28
29
29
- # File Permissions
30
+ ### File permissions
30
31
31
32
When using this action, ensure that your files have appropriate file permissions.
32
33
At a minimum, GitHub Pages expects:
@@ -35,34 +36,37 @@ At a minimum, GitHub Pages expects:
35
36
36
37
Failure to supply adequate permissions will result in a ` deployment_perms_error ` when attempting to deploy your artifacts to GitHub Pages.
37
38
39
+ #### Example permissions fix for Linux
40
+
38
41
``` yaml
39
- ...
40
- runs :
41
- using : composite
42
- steps :
43
- - name : Archive artifact
44
- shell : sh
45
- if : runner.os == 'Linux'
46
- run : |
47
- chmod -c -R +rX "$INPUT_PATH" |
48
- while read line; do
49
- echo "::warning title=Invalid file permissions automatically fixed::$line"
50
- done
51
- tar \
52
- --dereference --hard-dereference \
53
- --directory "$INPUT_PATH" \
54
- -cvf "$RUNNER_TEMP/artifact.tar" \
55
- --exclude=.git \
56
- --exclude=.github \
57
- .
58
- env :
59
- INPUT_PATH : ${{ inputs.path }}
60
-
61
- ...
42
+ steps :
43
+ # ...
44
+ - name : Fix permissions
45
+ run : |
46
+ chmod -c -R +rX "_site/" | while read line; do
47
+ echo "::warning title=Invalid file permissions automatically fixed::$line"
48
+ done
49
+ - name : Upload Pages artifact
50
+ uses : actions/upload-pages-artifact@v2
51
+ # ...
62
52
```
63
53
54
+ #### Example permissions fix for Mac
55
+
56
+ ``` yaml
57
+ steps :
58
+ # ...
59
+ - name : Fix permissions
60
+ run : |
61
+ chmod -v -R +rX "_site/" | while read line; do
62
+ echo "::warning title=Invalid file permissions automatically fixed::$line"
63
+ done
64
+ - name : Upload Pages artifact
65
+ uses : actions/upload-pages-artifact@v2
66
+ # ...
67
+ ```
64
68
65
- # Release instructions
69
+ ## Release instructions
66
70
67
71
In order to release a new version of this Action:
68
72
@@ -74,7 +78,7 @@ In order to release a new version of this Action:
74
78
75
79
⚠️ Environment approval is required. Check the [ Release workflow run list] [ release-workflow-runs ] .
76
80
77
- # License
81
+ ## License
78
82
79
83
The scripts and documentation in this project are released under the [ MIT License] ( LICENSE ) .
80
84
0 commit comments