mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
442182742b
* Stop checking out workspace (#515)
* Stop checking out base branch before deployment, drop option.
* Don't check out default branch, as we don't check out base branch, drop option.
* Don't stash/unstash as we don't update the workdir, drop preserve option.
* Don't init the workspace
* Only fetch the remote branch if it exists, only with depth 1.
* Rely on previous checkouts to have handled lfs files correctly, drop option.
* Update README, action.yml, integration tests
* Set up eslint for test files. (#517)
* Add DRY_RUN option, passing --dry-run to git push. (#526)
See #499 for the proposal.
* Simplifies Token Setup (#530)
* Token simplification
* Access Token / Github Token -> Token
* Oops
* Typos
* Update README.md
* Update README.md
* Update action.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
* Adjust codeql action to latest recommendations (#540)
Also, add the dev and release branches, and drop master.
* Add workflow to update build and node_modules on release branches (#541)
* Stores username/email in secrets
* Removing stale bot integration
* Test current code base as an integration test for PRs and pushes (#505)
* Add a build step to create lib and node_modules artifact
* Run integration test with built dist and current SHA as base
For pull requests, the github.sha is the sha of the merge to the
target branch, not the head of the PR. Special case that.
* Use v2 checkout, and DRY_RUN for the integration test.
I also made the branches more generic, as there are now more of them.
* Fix #536, don't push at all on dryRun
Also add tests for dryRun and singleCommit and generateBranch
code flows.
* Try to fix dryRun on new remote branches, refactor fetch
* Try to fix dryRun, only fetch if origin branch exists
* Refactor worktree setup to include branch generation and setup for singleCommit
This is a continuation of the no-checkout work, and sadly suggested pretty
intensive changes.
* Set up git config to fix tests, also make debugging easier
* Add matrix for existing and non-existing branch
* Add matrix for singleCommit and not
* Drop GITHUB_TOKEN, add DRY_RUN to action.yml
* When deploying existing branch, add a modifcation and deploy again
* Force branch checkout to work in redeployment scenarios
* Make singleCommit easier to see in job descriptions
* Review comments
* Add a test-only property to action to test code paths with remote branch.
* Introduce TestFlag enum to signal different test scenarios to unit tests
* Fix util.test.ts
* Update worktree.ts
* Fix a few nits in tests and automation. Don't try to wordcount ls-rem… (#546)
* Fix a few nits in tests and automation. Don't try to wordcount ls-remote.
Nits in tests are around undoing changes made to the environment,
and to not modify the checkout.
* Describe suite with empty SHA
* Lowercase Inputs (#547)
* Lowercases inputs
* Adjusts workflow tests and deployment_status
* Use multi-line string for clean-exclude patterns. (#553)
As this change is subtle, I'm taking the opportunity to change
the underscore for the hyphen, which makes it less likely that
users of this action will just pass in an old json array.
* Hyphenate inputs and outputs, add step output, fix #558 (#559)
* Hyphenate inputs and outputs, add step output, fix #558
I've also tried to make the clean docs a bit clearer, and consistent
about clean being on my default. Still not totally happy with the intro
of the docs there, though.
* Add testing of step outputs to build integration tests
* Security Docs
* Integration tests
* Revert "Integration tests"
This reverts commit 639ff537d5
.
* Native SSH Key Support (#569)
* SSH Key Support 🔑
* Update ssh.ts
* Update src/ssh.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* README fixes/etc
* Unit Tests & README
* ssh key
* Update README.md
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update ssh.test.ts
* Update integration.yml
Co-authored-by: Axel Hecht <axel@pike.org>
* Deployment Issues (#583)
* Update git.ts
* Tests
* Update git.ts
* Formatting
* Update src/git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* TestFlag
* Logging
* Update git.ts
Co-authored-by: Axel Hecht <axel@pike.org>
* Codespace Support (#584)
* Add files via upload
* Update README.md
* Add files via upload
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* SSH Issues (#588)
* Unsets Persisted Credentials (#587)
* Persist
* Config Setup/Tests
* Assets
* Update git.ts
* Spacing
* Update integration.yml
* Update README.md
Co-authored-by: Axel Hecht <axel@pike.org>
90 lines
4.5 KiB
YAML
90 lines
4.5 KiB
YAML
name: 'Deploy to GitHub Pages'
|
|
description: 'This action will handle the deployment process of your project to GitHub Pages.'
|
|
author: 'James Ives <iam@jamesiv.es>'
|
|
runs:
|
|
using: 'node12'
|
|
main: 'lib/main.js'
|
|
branding:
|
|
icon: 'git-commit'
|
|
color: 'orange'
|
|
inputs:
|
|
ssh-key:
|
|
description: >
|
|
This option allows you to define a private SSH key to be used in conjunction with a repository deployment key to deploy using SSH.
|
|
The private key should be stored in the `secrets / with` menu **as a secret**. The public should be stored in the repositories deployment
|
|
keys menu and be given write access.
|
|
|
|
Alternatively you can set this field to `true` to enable SSH endpoints for deployment without configuring the ssh client. This can be useful if you've
|
|
already setup the SSH client using another package or action in a previous step.
|
|
required: false
|
|
|
|
token:
|
|
description: >
|
|
This option defaults to the repository scoped GitHub Token.
|
|
However if you need more permissions for things such as deploying to another repository, you can add a Personal Access Token (PAT) here.
|
|
This should be stored in the `secrets / with` menu **as a secret**.
|
|
|
|
We recommend using a service account with the least permissions neccersary
|
|
and when generating a new PAT that you select the least permission scopes required.
|
|
|
|
[Learn more about creating and using encrypted secrets here.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
|
|
required: false
|
|
default: ${{ github.token }}
|
|
|
|
branch:
|
|
description: 'This is the branch you wish to deploy to, for example gh-pages or docs.'
|
|
required: true
|
|
|
|
folder:
|
|
description: 'The folder in your repository that you want to deploy. If your build script compiles into a directory named build you would put it here. Folder paths cannot have a leading / or ./. If you wish to deploy the root directory you can place a . here.'
|
|
required: true
|
|
|
|
target-folder:
|
|
description: 'If you would like to push the contents of the deployment folder into a specific directory on the deployment branch you can specify it here.'
|
|
required: false
|
|
|
|
commit-message:
|
|
description: 'If you need to customize the commit message for an integration you can do so.'
|
|
required: false
|
|
|
|
clean:
|
|
description: 'If your project generates hashed files on build you can use this option to automatically delete them from the target folder on the deployment branch with each deploy. This option is on by default and can be toggled off by setting it to false.'
|
|
required: false
|
|
default: true
|
|
|
|
clean-exclude:
|
|
description: "If you need to use clean but you would like to preserve certain files or folders you can use this option. This should contain each pattern as a single line in a multiline string."
|
|
required: false
|
|
|
|
dry-run:
|
|
description: "Do not actually push back, but use `--dry-run` on `git push` invocations insead."
|
|
required: false
|
|
|
|
git-config-name:
|
|
description: "Allows you to customize the name that is attached to the GitHub config which is used when pushing the deployment commits. If this is not included it will use the name in the GitHub context, followed by the name of the action."
|
|
required: false
|
|
|
|
git-config-email:
|
|
description: "Allows you to customize the email that is attached to the GitHub config which is used when pushing the deployment commits. If this is not included it will use the email in the GitHub context, followed by a generic noreply GitHub email."
|
|
required: false
|
|
|
|
repository-name:
|
|
description: "Allows you to speicfy a different repository path so long as you have permissions to push to it. This should be formatted like so: JamesIves/github-pages-deploy-action"
|
|
required: false
|
|
|
|
workspace:
|
|
description: "This should point to where your project lives on the virtual machine. The GitHub Actions environment will set this for you. It is only neccersary to set this variable if you're using the node module."
|
|
required: false
|
|
|
|
single-commit:
|
|
description: "This option can be used if you'd prefer to have a single commit on the deployment branch instead of maintaining the full history."
|
|
required: false
|
|
|
|
silent:
|
|
description: "Silences the action output preventing it from displaying git messages."
|
|
required: false
|
|
|
|
outputs:
|
|
deployment-status:
|
|
description: 'The status of the deployment that indicates if the run failed or passed. Possible outputs include: success|failed|skipped'
|