Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For more information, please see our complete deployment guide—[Deploy your As
- `build-cmd` - Optional: the command to run to build your site. Defaults to `deno task build` for sites using Deno and to `<package-manager> run build` for all other package managers.
- `cache` - Optional: enable Astro build cache to speed up subsequent builds. Caches optimized images and other build assets. Defaults to `true`.
- `cache-dir` - Optional: path to the Astro cache directory (relative to `path`). Defaults to `node_modules/.astro`. Only used when `cache` is `true`.
- `out-dir` - Optional: path to the Astro output directory, as created by build (relative to `path`). Defaults to `dist`. This directory is artifacted by this action.

### Example workflow:

Expand Down Expand Up @@ -53,6 +54,7 @@ jobs:
# node-version: 22 # The specific version of Node that should be used to build your site. Defaults to 22. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# build-cmd: pnpm run build # The command to run to build your site. Runs the package build script/task by default. (optional)
# out-dir: dist # The output directory created by the build command. Defaults to dist. (optional)

deploy:
needs: build
Expand Down
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ inputs:
description: "Path to the Astro cache directory (relative to 'path' input). Defaults to 'node_modules/.astro'"
required: false
default: "node_modules/.astro"
out-dir:
description: "Path to the output build directory (relative to 'path' input). Defaults to 'dist'"
required: false
default: "dist"

runs:
using: composite
Expand Down Expand Up @@ -189,7 +193,7 @@ runs:
.
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}/dist/
INPUT_PATH: ${{ inputs.path }}/${{ inputs.out-dir }}/

- name: Archive artifact
shell: sh
Expand All @@ -205,7 +209,7 @@ runs:
.
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}/dist/
INPUT_PATH: ${{ inputs.path }}/${{ inputs.out-dir }}/

- name: Archive artifact
shell: bash
Expand All @@ -222,7 +226,7 @@ runs:
"."
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}/dist/
INPUT_PATH: ${{ inputs.path }}/${{ inputs.out-dir }}/

- name: Upload artifact
id: upload-artifact
Expand Down