Merge branch 'main' into JamesMGreene-patch-1

This commit is contained in:
James M. Greene
2024-05-01 21:25:02 -05:00
committed by GitHub
6 changed files with 23 additions and 51 deletions

View File

@@ -4,3 +4,6 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "weekly" interval: "weekly"
groups:
non-breaking-changes:
update-types: [minor, patch]

View File

@@ -8,7 +8,7 @@ jobs:
draft-release: draft-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: release-drafter/release-drafter@v5 - uses: release-drafter/release-drafter@v6
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -24,7 +24,7 @@ jobs:
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag id: update-major-tag
uses: actions/publish-action@v0.2.2 uses: actions/publish-action@v0.3.0
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -22,7 +22,7 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Generate files - name: Generate files
run: mkdir artifact && mkdir artifact2 && cd artifact && ../script/new-artifact.sh run: mkdir artifact && mkdir artifact2 && cd artifact && ../script/new-artifact.sh
@@ -31,12 +31,13 @@ jobs:
- name: Upload Pages artifact - name: Upload Pages artifact
uses: ./ uses: ./
with: with:
name: pages-artifact-${{ matrix.os }}
path: artifact path: artifact
- name: Download artifact - name: Download artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
name: github-pages name: pages-artifact-${{ matrix.os }}
path: artifact2 path: artifact2
- name: Extract artifact - name: Extract artifact

View File

@@ -2,10 +2,6 @@
A composite Action for packaging and uploading artifact that can be deployed to [GitHub Pages][pages]. A composite Action for packaging and uploading artifact that can be deployed to [GitHub Pages][pages].
## Scope
⚠️ Official support for building Pages with Actions is in public beta at the moment.
## Usage ## Usage
See [action.yml](action.yml) See [action.yml](action.yml)
@@ -27,46 +23,7 @@ The [`tar` file][tar] must:
- :warning: The GitHub Pages [officially supported maximum size limit is 1GB][pages-usage-limits], so the subsequent deployment of larger tarballs are not guaranteed to succeed — often because they are more prone to exceeding the maximum deployment timeout of 10 minutes. - :warning: The GitHub Pages [officially supported maximum size limit is 1GB][pages-usage-limits], so the subsequent deployment of larger tarballs are not guaranteed to succeed — often because they are more prone to exceeding the maximum deployment timeout of 10 minutes.
- ⛔ However, there is also an _unofficial_ absolute maximum size limit of 10GB, which Pages will not even _attempt_ to deploy. - ⛔ However, there is also an _unofficial_ absolute maximum size limit of 10GB, which Pages will not even _attempt_ to deploy.
- not contain any symbolic or hard links - not contain any symbolic or hard links
- contain only files and directories that all meet the expected minimum [file permissions](#file-permissions) - contain only files and directories
### 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.
#### Example permissions fix for Linux
```yaml
steps:
# ...
- name: Fix permissions
run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
# ...
```
#### Example permissions fix for Mac
```yaml
steps:
# ...
- name: Fix permissions
run: |
chmod -v -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
# ...
```
## Release instructions ## Release instructions

View File

@@ -14,6 +14,10 @@ inputs:
description: "Duration after which artifact will expire in days." description: "Duration after which artifact will expire in days."
required: false required: false
default: "1" default: "1"
outputs:
artifact_id:
description: "The ID of the artifact that was uploaded."
value: ${{ steps.upload-artifact.outputs.artifact-id }}
runs: runs:
using: composite using: composite
steps: steps:
@@ -21,6 +25,7 @@ runs:
shell: sh shell: sh
if: runner.os == 'Linux' if: runner.os == 'Linux'
run: | run: |
echo ::group::Archive artifact
tar \ tar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory "$INPUT_PATH" \ --directory "$INPUT_PATH" \
@@ -28,6 +33,7 @@ runs:
--exclude=.git \ --exclude=.git \
--exclude=.github \ --exclude=.github \
. .
echo ::endgroup::
env: env:
INPUT_PATH: ${{ inputs.path }} INPUT_PATH: ${{ inputs.path }}
@@ -36,6 +42,7 @@ runs:
shell: sh shell: sh
if: runner.os == 'macOS' if: runner.os == 'macOS'
run: | run: |
echo ::group::Archive artifact
gtar \ gtar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory "$INPUT_PATH" \ --directory "$INPUT_PATH" \
@@ -43,6 +50,7 @@ runs:
--exclude=.git \ --exclude=.git \
--exclude=.github \ --exclude=.github \
. .
echo ::endgroup::
env: env:
INPUT_PATH: ${{ inputs.path }} INPUT_PATH: ${{ inputs.path }}
@@ -51,6 +59,7 @@ runs:
shell: bash shell: bash
if: runner.os == 'Windows' if: runner.os == 'Windows'
run: | run: |
echo ::group::Archive artifact
tar \ tar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory "$INPUT_PATH" \ --directory "$INPUT_PATH" \
@@ -59,11 +68,13 @@ runs:
--exclude=.github \ --exclude=.github \
--force-local \ --force-local \
"." "."
echo ::endgroup::
env: env:
INPUT_PATH: ${{ inputs.path }} INPUT_PATH: ${{ inputs.path }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 id: upload-artifact
uses: actions/upload-artifact@v4
with: with:
name: ${{ inputs.name }} name: ${{ inputs.name }}
path: ${{ runner.temp }}/artifact.tar path: ${{ runner.temp }}/artifact.tar