mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2026-02-09 11:51:33 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84bb4cd4b7 | ||
|
|
8f17ae6041 | ||
|
|
bc7aff665b | ||
|
|
6327a23a11 | ||
|
|
81e1caf958 | ||
|
|
75e09bde99 | ||
|
|
74d0f02a66 | ||
|
|
6e866d065b | ||
|
|
a3f792f9c5 |
36
README.md
36
README.md
@@ -26,6 +26,42 @@ The [`tar` file][tar] must:
|
||||
- be under 10GB in size
|
||||
- not contain any symbolic or hard links
|
||||
|
||||
# File Permissions
|
||||
|
||||
When using this action, ensure that your files have appropriate file permissions.
|
||||
At a minimum, GitHub Pages expects:
|
||||
- files to have read permission for the current user and the "Others" user role (e.g. `0744`, `0644`, `0444`)
|
||||
- directories to have read and execute permissions for the current user and the "Others" user role (e.g. `0755`, `0555`)
|
||||
|
||||
Failure to supply adequate permissions will result in a `deployment_perms_error` when attempting to deploy your artifacts to GitHub Pages.
|
||||
|
||||
```yaml
|
||||
...
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Archive artifact
|
||||
shell: sh
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
chmod -c -R +rX "$INPUT_PATH" |
|
||||
while read line; do
|
||||
echo "::warning title=Invalid file permissions automatically fixed::$line"
|
||||
done
|
||||
tar \
|
||||
--dereference --hard-dereference \
|
||||
--directory "$INPUT_PATH" \
|
||||
-cvf "$RUNNER_TEMP/artifact.tar" \
|
||||
--exclude=.git \
|
||||
--exclude=.github \
|
||||
.
|
||||
env:
|
||||
INPUT_PATH: ${{ inputs.path }}
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
# Release instructions
|
||||
|
||||
In order to release a new version of this Action:
|
||||
|
||||
@@ -21,6 +21,9 @@ runs:
|
||||
shell: sh
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
chmod -c -R +rX "$INPUT_PATH" | while read line; do
|
||||
echo "::warning title=Invalid file permissions automatically fixed::$line"
|
||||
done
|
||||
tar \
|
||||
--dereference --hard-dereference \
|
||||
--directory "$INPUT_PATH" \
|
||||
@@ -36,6 +39,9 @@ runs:
|
||||
shell: sh
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
chmod -v -R +rX "$INPUT_PATH" | while read line; do
|
||||
echo "::warning title=Invalid file permissions automatically fixed::$line"
|
||||
done
|
||||
gtar \
|
||||
--dereference --hard-dereference \
|
||||
--directory "$INPUT_PATH" \
|
||||
|
||||
Reference in New Issue
Block a user