mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2025-12-08 16:16:18 +00:00
33
README.md
33
README.md
@@ -12,22 +12,21 @@ If you breakdown your workflow in two jobs (`build` and `deploy`), we recommend
|
|||||||
jobs:
|
jobs:
|
||||||
# Build job
|
# Build job
|
||||||
build:
|
build:
|
||||||
|
|
||||||
# Specify runner + build & upload the static files as an artifact
|
# Specify runner + build & upload the static files as an artifact
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Build static files
|
- name: Build static files
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
# <Not provided for brevity>
|
# <Not provided for brevity>
|
||||||
# At a minimum this step should build the static files of your site
|
# At a minimum this step should build the static files of your site
|
||||||
# <Not provided for brevity>
|
# <Not provided for brevity>
|
||||||
|
|
||||||
- name: Upload static files as artifact
|
- name: Upload static files as artifact
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
|
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
|
||||||
with:
|
with:
|
||||||
path: build_outputs_folder/
|
path: build_outputs_folder/
|
||||||
|
|
||||||
# Deployment job
|
# Deployment job
|
||||||
deploy:
|
deploy:
|
||||||
@@ -40,16 +39,15 @@ jobs:
|
|||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@v4
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Inputs 📥
|
### Inputs 📥
|
||||||
|
|
||||||
| Input | Required? | Default | Description |
|
| Input | Required? | Default | Description |
|
||||||
| ---------------- | --------- | ----------------------- | -------------------------------------------------- |
|
| ---------------- | --------- | -------------- | -------------------------------------------------- |
|
||||||
| `name` | `false` | `github-pages` | Artifact name |
|
| `name` | `false` | `github-pages` | Artifact name |
|
||||||
| `path` | `true` | `_site/` | Path of the directory containing the static assets |
|
| `path` | `true` | `_site/` | Path of the directory containing the static assets |
|
||||||
| `retention-days` | `false` | `1` | Duration after which artifact will expire in days |
|
| `retention-days` | `false` | `1` | Duration after which artifact will expire in days |
|
||||||
|
|
||||||
### Outputs 📤
|
### Outputs 📤
|
||||||
|
|
||||||
@@ -57,7 +55,6 @@ jobs:
|
|||||||
| ------------- | ---------------------------------------- |
|
| ------------- | ---------------------------------------- |
|
||||||
| `artifact_id` | The ID of the artifact that was uploaded |
|
| `artifact_id` | The ID of the artifact that was uploaded |
|
||||||
|
|
||||||
|
|
||||||
## Artifact validation
|
## Artifact validation
|
||||||
|
|
||||||
While choosing to use this action as part of your approach to deploying to GitHub Pages is technically optional, we highly recommend it since it takes care of producing (mostly) valid artifacts.
|
While choosing to use this action as part of your approach to deploying to GitHub Pages is technically optional, we highly recommend it since it takes care of producing (mostly) valid artifacts.
|
||||||
@@ -83,7 +80,7 @@ In order to release a new version of this Action:
|
|||||||
|
|
||||||
2. Publish the draft release from the `main` branch with semantic version as the tag name, _with_ the checkbox to publish to the GitHub Marketplace checked. :ballot_box_with_check:
|
2. Publish the draft release from the `main` branch with semantic version as the tag name, _with_ the checkbox to publish to the GitHub Marketplace checked. :ballot_box_with_check:
|
||||||
|
|
||||||
3. After publishing the release, the [`release` workflow][release] will automatically run to create/update the corresponding the major version tag such as `v0`.
|
3. After publishing the release, the [`release` workflow][release] will automatically run to create/update the corresponding major version tag such as `v0`.
|
||||||
|
|
||||||
⚠️ Environment approval is required. Check the [Release workflow run list][release-workflow-runs].
|
⚠️ Environment approval is required. Check the [Release workflow run list][release-workflow-runs].
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user